Hey there!
I'm trying to verify the data in a form. By doing so I have created a set of functions that verify different parts of the form and if everything is okay it sets $var1="good", $var2="good", $var3="good", respectively. I then created another function that runs these functions and is followed by an if/else.
I can't figure out why after setting the value to $var1,etc. it's not being passed into the following if/else statement.
Here's the code, I used:
function check_form_process( // A bunch of variables from the form )
{
check_u_name( $var1, etc. );
check_pass($var2, etc. );
check_form($var3, etc. );
if (($var1 == "good") && ($var2 == "good") && ($var3 == "good")) :
add_reg( // Variables to add insert into database );
else :
input_reg( // variables to be sent back to the form );
endif;
}
Everything works fine execpt when the user would add all the information correctly 🙂 lol. I tried to echo the variables after the three functions were ran, but the variables were empty. Please help, what the heck am i doing wrong?