parse form input
| From: | Robert | Date: | Tue, 30 Jan 2001 15:25:40 +0000 |
| Subject: | parse form input | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-37397@lists.php.net to get a copy of this message | ||
variables passed from form =
part=68030&quan=500&I=x&part=68040&quan=350&I=x&sid=6754g543a76
I am sending several part numbers from the form, but when parsed it only gives me the last one
How do I get it to return all of the parts? I'm a PHP newbie, only been programming for 2
weeks...
<script language="php"
$i=0;
if(!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key,$val)= each($HTTP_POST_VARS)){
$GLOBAL[$key]= $val;
$val=stripslashes($val);
if ($key =="I"){$message=$message. "_________________________\n";}
//<---Divide parts into individual sections
if ($key !="sid" ){if ($key !="I"){$message=$message. "$key =
$val\n";}} //<---Add to message unless key is sid
echo $key " = " $val;
}
</script>
Thanks for any help