RE: Correct handling _POST[] and implode. PHP5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just realised I have get_magic_quotes_gpc turned on and was not catering
for arrays.

Thanks for your time.

Adam


Andrea Giammarchi-3 wrote:
> 
> 
> 
>> so it's simple, it's not an array, but your assignment magically makes it
>> an array since you wrote "iterate over the array" ... very, very clear,
>> isn't it?
> 
> OK, sarcasm a part, this works perfectly for me, and it's quite obvious
> Colors IS an array ...
> 
> <?php
> if(isset($_POST['Colors']))
>     echo implode(',', $_POST['Colors'])
> ;
> ?>
> <form method="POST" action="?">
>     <input type="checkbox" name="Colors[]" value="green" checked="checked"
> /> Green
>     <input type="checkbox" name="Colors[]" value="yellow" /> Yellow
>     <input type="checkbox" name="Colors[]" value="red" /> Red
>     <input type="checkbox" name="Colors[]" value="gray" /> Gray
>     <input type="submit" />
> </form>
> 
> Regards
>  		 	   		  
> _________________________________________________________________
> Windows Live: Friends get your Flickr, Yelp, and Digg updates when they
> e-mail you.
> http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010
> 

-- 
View this message in context: http://www.nabble.com/Correct-handling-_POST---and-implode.-PHP5-tp25815789p25817889.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux