When the user clicks Submit button, I need to UPDATE the data in database with SQL in my PHP code but the SQL code also needs the value from form inputs in the HTML. I tried combining Javascript with the SQL code but with no luck (I knew this code probably wouldn't work but I wrote it to get the point across).
$sql = "UPDATE postsTable
SET ApplicationName=\"" .<script>document.getElementById("AppName").value</script>. "\"
WHERE PostID=3;";
$result = $conn->query($sql);
How do I get data from an HTML form into PHP?
POSTandGET),SESSIONvariables, etc. The way you go about it is up to you.