I am using PHP 4.3.0. it looks a little confusing because I am not using the $_POST when calling variables, but that is because before that script I have this.

$title = $_POST['title'];
$version = $_POST['version'];
$developer = $_POST['developer'];
$serial_number = $_POST['serial_number'];
$platform = $_POST['platform'];

For me it makes things easier to read.

I changed what you said, and it still doesn't update anything. I even added echo $HTTP_POST_VARS['id']; to check to see if there was any value, but the echo statement doesn't return anything.

Can I carry the HTTP_POST_VARS to another page, or do I need to use hidden fields or something?


On Thursday, January 30, 2003, at 10:10 AM, Matt Schroebel wrote:

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