Link to home
Start Free TrialLog in
Avatar of scm0sml
scm0sml

asked on

problem checking value of POST variable

I have a variable which is being posted into a page.

The variable came from a textbox.

All I want to do is check the value of the variable is valid.

code below:
                global $p_forename;
                                    
            if($p_forename ==  "" || "Enter Your First Name")
            {
                  $p_forename = "Enter Your First Name";
                  $invalid = 1;
            }

If I do an echo on $p_forename before the check it contains a value that should jump over this check.....

If the value is invalid a return to the page in which it was entered.

in this example i should be moving on but it keeps going back to the entry page and populating the forename textbox with "Enter Your First Name" which shouldnt be happening.

Can anyway see what im doing wrong.

cheers
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial