> -----Original Message-----
> From: Mike Tuller [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 30, 2003 11:02 AM
> Subject: [PHP] HTTP_GET_VARS[]

> 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]'" ;

Change the var to '{$HTTP_POST_VARS['id']}' (with the curly braces since
the array reference is inside a double quoted string.  If your version
of php is 4.1.2 or higher, you really ought to use '{$_POST['id']}'
since it's a magic global and easier to use since you won't have to
declare it global inside functions.
 

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

Reply via email to