> >> $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.

My bad, I misunderstood what you meant. Yes, you'll need to save the id
from the get, and put it in a hidden field on the form or in a session
var, and use that in the update.  Still, make sure to wrap the array
reference in curly braces inside the double quoted string.

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

Reply via email to