Ok I'm tring to use foreach to get form data but all I get is "submit submit". What's wrong? Here is the code... <?php foreach($_GET as $key=>$val); {echo "$key $val"; } ?> PHP:
Your basic code is off, should be like this: <?php foreach($_GET as $key=>$val) { echo "key: ".$key." val: ".$val; } ?> Code (markup): Also you form method must be GET, however most of the time you would use POST; <?php foreach($_POST as $key=>$val) { echo "key: ".$key." val: ".$val; } ?> Code (markup):
Thanks for the help. It works now. I forgot about the "." thing. I was using _GET so I could see if the values were getting passed correctly. I normally use _POST though. Thanks again for your help.