Re: Variables with - in their name
| From: | Alessandro Pellizzari | Date: | Mon, 19 Nov 2012 09:49:14 +0000 |
| Subject: | Re: Variables with - in their name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319736@lists.php.net to get a copy of this message | ||
Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto:
> echo "<select name=\"distributor-" . $row['promo_code_prefix'] .
> "-" .
> $row['promo_code_suffix'] . "\" style=\"text-align:
> center;\">\r\n";
> It could be wrote:
>
> <?php
> echo $distributor-42-2;
You MUST disable register_globals in your php.ini
Once you have done that (and even before that...) you find your variable
in $_POST['distributor-42-2']
(or $_GET, depends on your form method)
Bye.