[PHP] multiselects and arrays
Hi. Why doesn't PHP convert mutiselect values with plain names (not array-like) to arrays. Is there any reason to not doing this? Example: I have a page with multiselect, which name is SEL1 (I cannot use square brackets because I need to use a JavaScript on the page, so, it's not allowed in variable names to contain [ ] ). When browser submits this page, and if there are sew values selected in this multiselect, it just sends this values along to each other with same name. (such as in case of GET method: http://somehost.com/index.php?SEL1=1SEL2=2) So, why not parse this, and in case if there are more than one variable with same name, convert this variable to array, and put all the values there? Thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Forms and PHP_SELF
Chad Guilette [EMAIL PROTECTED] wrote in message 000701c0d962$d28fb670$0100a8c0@optimus">news:000701c0d962$d28fb670$0100a8c0@optimus... I'm currently working on a project and I've come across a problem which I'm sure has been discussed several times before but I still need some assistance on it. I have a page with a form whose action is $PHP_SELF so the form and the form action are all in the same pagethis works fine but in the form action a message is displayed stating success or failure of the insertion of data into a database and the user is redirected by means of a meta refershduring this time if the user refreshes the page the data is resubmitted againthe user can do this repeatedly Some people have suggested that I use headers but I cannot do this at this point because I've already sent the header... Well You can use output buffering see ob_start(); others have suggested I use some variable $script_ran_count = 1 then run and after increment so a test of it would be false...this had no effect others have suggested javascript... I'm really baffled...how can I have a self-submitting form page that has a display message and a meta redirect but if the user refreshes the page stop the resumission of data? Regards, Chad Guilette -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]