RE: [PHP] how to use echo checkboxes in php when i don't have access to $_POST
| From: | Jasper Mulder | Date: | Sat, 28 May 2011 12:19:39 +0000 |
| Subject: | RE: [PHP] how to use echo checkboxes in php when i don't have access to $_POST | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313208@lists.php.net to get a copy of this message | ||
----------------------------------------
> Date: Sat, 28 May 2011 16:39:13 +0430
> From: nickparsa@gmail.com
> To: lars@mit-web.dk
> CC: php-general@lists.php.net
> Subject: Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST
>
> because when the name is in echo it can't access to $_POST
> 4 example $_POST['p$i']
> it tells me undefined variable p$i
>
> when in html we write it in form because it has post method it can set
> $_POST but here in php i just echo it and i can't access it
> maybe i am wrong but how can i correct it?
In PHP, single quotes do not allow in-line variable substitution.
My guess is that it will work if you use $_POST['p'.$i] or $_POST["p$i"]
instead.
Further, please mind your punctuation and language use - here I also refer to the
other posts you made. As was stated before, people may be offended and thus it makes
the chances of you solving your problem fast smaller.
As a last, please refrain from bombarding the list with small posts. Please think a bit
before posting your questions. Thanks in advance.
Best regards,
Jasper Mulder