Monday, 20 March 2017

PHP / MySQL update query problems

I'm having trouble making this query work:




if(isset($_POST['updateRecord'])) {
mysql_query("UPDATE files SET title = '$_POST[title]', description = '$_POST[description]', internal = '$_POST[accessFile]', category = '$_POST[category]' WHERE title = '$_POST[title]'");
header("Location: system-management.php?viewFiles=on");
}



It is definatly entering the if statement as the header is redirecting to the correct page. I have set the form submit to use the post method and even if I use the get method I can see that my form data is being passed.



I have tried quoting out the header location and error reporting (or die) on the query but it brings up no errors



The form submit button is within a table column as follows:







Is there something really obvious that I'm missing here?



Any help you can offer would be really appreciated!

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...