RE: [PHP] Little problem with a form
| From: | Krznaric Michael | Date: | Mon, 11 Sep 2000 13:26:40 +0000 |
| Subject: | RE: [PHP] Little problem with a form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16168@lists.php.net to get a copy of this message | ||
Hi,
Well in a form if you had something along the lines of <INPUT
NAME="City" ....> then in your processing script you should be able to say
echo $City
The variable will be automatically defined. IF you are looking to go
through an unknown number of posted variables (something along the lines of
readind stdin in perl and parsing the info) then you should look at the
predefined variables
http://www.php.net/manual/language.variables.predefined.php
HTTP_GET_VARS - An associative array of variables passed to the current
script via the HTTP GET method.
HTTP_POST_VARS - An associative array of variables passed to the current
script via the HTTP POST method.
You can then walk throught this array and do with it as you please.
Mike
-----Original Message-----
From: Diego Pérez Rández [mailto:webzitos@terra.es]
Sent: Monday, September 11, 2000 8:46 AM
To: php-general@lists.php.net
Subject: [PHP] Little problem with a form
Hi to all:
I usually work with perl and a frien tell me somethin about php. I get
an online manual and i try to do some examples.
For example, I want to generate an e-mail with some data receive from a
form of a web page.
I do some examples and I can´t get the name of the fields. I need this
because i want to generate a general code for receive the data of a form
and then generate an e-mail.
I do some examples with this code:
<form ......
<input name="first[1]".....
<input name="first[2]".....
<input name="second[1].....
This receive easy the data of the fields. But i can get the name of the
field. I want to generate an e-mail like this:
Data receive from the web page:
Name : Pepito Flores
Address : lsdjfalkdfjaldk
City : Pamplona
......
The values of name, addres and city i would like to
obtain from the form.
Can anyone help me.
Thanks.
Best Regards, Diego
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net