array question
| From: | Michelle | Date: | Thu, 30 May 2002 23:24:49 +0000 |
| Subject: | array question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-100017@lists.php.net to get a copy of this message | ||
I'm a newbie at php and I'm sure you will be able to tell by my question. I'm just
doing a simple form but my head is hurting from trying to figure out the correct syntax.
I'm posting the form to $PHP_SELF
an example from my $form_block =
<p><b>*</b>Your Name:<br />
<INPUT type=\"text\" name=\"sender_name\"
value=\"$_POST[sender_name]\" size=30></p>
<p><b>*</b>Your E-Mail Address:<br />
<INPUT type=\"text\" name=\"sender_email\"
value=\"$_POST[sender_email]\" size=30></p>
<p>Phone Number:<br />
<INPUT type=\"text\" name=\"phone\" value=\"$_POST[phone]\"
size=30></p>
which finally leads to my question how do I do the $_POST[var] when it's an array(checkbox or
radio button)?
ex: <input type=\"checkbox\" name=\"product[]\"
value=\"red\">red<br />
Am I making sense? If not please let me know :-) and I will try to remedy it.
Michelle