I have a simple 1 record, 1 field, MySQL database whose record I am trying to change using a php script but the UPDATE script does not update the record but instead merely redirects to the index page (which I want to happen after the UPDATE occurs).
Attached is my script. Might someone give me assistance in troubleshooting my script so that the “notes” field updates? I had assumed that changing $_POST[notes] to $_POST[‘notes’] would work but that failed.
Thanks in advance.
//Connect To Database
$yourfield = "notes";
$query = "UPDATE $usertable SET $yourfield = $_POST[notes]";