I have created a page for editing a row in a MySql database where first I have a page listing the items in the table, and have the id as a hypertext link that then on then opens the editing page with the correct information using HTTP_GET_VARS[id] where the URL is http://127.0.0.1/asset/editsoftwareasset.php?id=3. The issue I am having now is that I have the editsoftwareassest.php's form action set to POST to a script called updatesoftwareasset.php that is supposed to take the values from the fields in editsoftwareasset.php and update the information. I have the following statement sent to the database.

$query = "UPDATE assets SET title = '$title', version = '$version', developer = '$developer', serial_number = '$serial_number', WHERE asset_id = '$HTTP_GET_VARS[id]'" ;

The $HTTP_GET_VARS[id] variable doesn't seem to carry to this script. I tested the sql statement by by having the asset_id = '3', and it updated the record, but the HTTP_GET_VARS didn't. How can I have the editsoftwareasset.php POST to the updatesoftwareasset.php and carry the HTTP_GET_VARS variable so that I can update the correct record?

I hope all of this makes sense.


Mike


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to