Form values not submitting to email after validation

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
BigZ1981
New php-forum User
New php-forum User
Posts: 7
Joined: Sat Jul 19, 2014 11:24 pm

Re: Form values not submitting to email after validation

Post by BigZ1981 » Sun Jul 20, 2014 1:40 am

I know PHP is loose with its variables, but I would try being explicit and putting the single quotes around your $s assigning values or taking the quotes off your numbers on your if statements to see if that changes things. The way the code looks to me is that you're putting an integer type value into the variable $s and comparing it to a string. In such a case, your if statements won't process because it's not finding a match. Using $s='1'/$s='2' or if ($s==1)/if ($s==2) might get it to process correctly.

EDIT:
On a side note, if you want the form to clear after it submits, I would add a line on that if ($s=='1') statement to clear out all values ($xxx=$yyy=$zzz="").

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest