[PHP] getting data from form...

2001-10-18 Thread Teqila MAN

I have file .

index.php3 a form in it ...

input type=checkbox name=Steak value="15.25"
input type=checkbox name=XYZ value="10.25"
input type=checkbox name=CHIPs value="5.25"

and how to make it that form.php3 will read all the data that was submitted
(i'm mean the name and the value)








Teqilaman


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] getting data from form...

2001-10-18 Thread Intruder

TM I have file .

TM index.php3 a form in it ...

TM input type=checkbox name=Steak value=15.25
TM input type=checkbox name=XYZ value=10.25
TM input type=checkbox name=CHIPs value=5.25

TM and how to make it that form.php3 will read all the data that was submitted
TM (i'm mean the name and the value)


do you mean :

reset($HTTP_POST_VARS);
while (list ($name, $value) = each($HTTP_POST_VARS)) {
  proceed with them
  e.g.
  if ($name==Steak) {
echo Variable name: .$name. equals to .$value;
  };
  if ($name==XYZ) {
echo Variable name : .$name. and it's value is .$value;
  };
  ...
};

Put this code whereever you want to process your submited form
Note that you haven't input type=submit on your form, but in most cases it's
necessaey to have it (exept some JavaScript was added).



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] getting data from form...

2001-10-18 Thread Thomas Deliduka

Well the form has to submit to the other file. Normally with default PHP
configurations it will automatically make the variables $Steak, $XYZ, and
$CHIPs with the corresponding values IF the checkboxes are checked. If it's
not checked nothing is set.

So you can do this on the receiving page:

If (!isset($Steak)) $Steak = 0;
If (!isset($XYZ)) $XYZ = 0;
If (!isset($CHIPs)) $CHIPs = 0;

Remember that variable names are case sensative.

On 10/18/2001 4:48 PM this was written:

 I have file .
 
 index.php3 a form in it ...
 
 input type=checkbox name=Steak value=15.25
 input type=checkbox name=XYZ value=10.25
 input type=checkbox name=CHIPs value=5.25
 
 and how to make it that form.php3 will read all the data that was submitted
 (i'm mean the name and the value)

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]