Code: Select all
$query = 'UPDATE `dogParks` SET `name` = $name, `description` = $description, `city` = $city, `state` = $state, `zip` = $zip, `website` = $website, `offleash` = $offleash WHERE `key` = $_GET['id'] LIMIT 1;';
I have a link on my report page to pass the primary key to another php page which queries the database and returns the data for the record and populates a form. Work's just fine. Submit the form, passes the primary key again and calls the update code above. Creates a new record instead of updating it. I'm going to assume the code above is correct and that there's something else I am missing. What could be causing this? I would be very relieved to find out I'm making a noobie mistake. Thanks in advance.