Action file on submit when if condition is true

HI !
I have made a form which is containing some condition.
such as
if ($_POST[‘submit’] && condition = true)
(!!! Open action file !!!)
else
echo “Invalid username”;

I can not open it on submit when condition is true.

If condition is true & submit, Either open action file or jump the paricular file

PLEASE !!!
Help Me !

I know this is late, but a couple of notes…

First this is not really an PHP Installation and Configuration but i will go ahead anyway.

Next consider checking for content in the $_POST variable. more like

if (!empty($_POST['submit']) && $condition == true) {
     (!!! Open action file !!!)
} else {
     echo "Invalid username";
}

Also I am not sure if what you put up there is more pseudo-code or not, however, I noticed it was a half and half. Please make sure:

  • your Comparison (equals) is an ==
  • You use the curly braces { } to segment the IF statement
  • Your Variables start with a $

Again, sorry it’s late but I hope it helps. (or maybe helps someone else.)

Sponsor our Newsletter | Privacy Policy | Terms of Service