HTTP_GET_VARS[]

From: Date: Thu, 30 Jan 2003 16:02:13 +0000
Subject: HTTP_GET_VARS[]
Groups: php.general 
Request: Send a blank email to php-general+get-133663@lists.php.net to get a copy of this message
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

« previous php.general (#133663) next »