PHP page not displaying

Hi, I am a newbie at php. I sort of inherited a php problem. This page: was custom designed but is not displaying properly. Any help on why would be awesome. Thanks.

Why do you think this is a PHP problem?

If you’re talking about the form not showing, try loading the page with javascript turned off.

I just assumed it was a php problem. This is supposed to be the admin page for a custom designed price section. The person cannot login to make changes to the other pages. Sorry I am kind of flying blind here. Thanks.

So you mean

The view-source shows

<!-- Login form here --><form name='formVlogin' id='formVlogin' method='post' action='processVlogin.php'>
<input type='hidden' name='source' value='desktop' />
<input name='username' id='username' class='input-large validate[required]' type='text'>

<label style='margin-top:10px;'>Password</label>
<input name='passcode' id='passcode' class='input-large validate[required]' type='password'>
<div class='xbF00' style='padding-top:10px;'>
<button type='submit' id='submitVlogin' class='btn pull-right'>Sign in</button>
<label class='checkbox' style='padding-top:10px;'>
<input type='checkbox' class='mT4' checked> Remember me
<br /></div>


So if that form isn’t working it could be a problem with the processVlogin.php file.

Is processVlogin.php too big to post or attach here?

Hi, this is actually processVlogin.php. I hope this what you need.

// Page-specific includes
// Variables(include Arrays,Objects,etc)
// Tables


$q="SELECT * FROM admin WHERE username LIKE BINARY '$username' AND passcode LIKE BINARY '$passcode'";$rs=mysql_query($q);//echo $q;exit();
//$qb="SELECT * FROM client WHERE username LIKE BINARY '$username' AND passcode LIKE BINARY '$passcode'";$rsb=mysql_query($qb);//echo $qb;exit();
   if($source=='desktop'){   $adminUrl="yogaretreats.php";    $clientUrl="";    $invalidUrl="admin.php?e0x=1";        }
elseif($source=='mobile'){       }

    if($username==''||$passcode==''||$source==''){header("Location: $invalidUrl");}
// ____________________ SOF Part A _____________________
setcookie(adminUsername,$f_tblMmUserFld[1],$cokieExp);setcookie(adminPasscode,$f_tblMmUserFld[2],$cokieExp);header("Location: $adminUrl");}
else{header("Location: $invalidUrl");}
// ____________________ EOF Part A _____________________
/* ____________________ SOF Part B _____________________ *
setcookie(clientUsername,$f_tblClientFld[1],$cokieExp);setcookie(clientPasscode,$f_tblClientFld[2],$cokieExp);header("Location: $clientUrl");}
else{header("Location: $invalidUrl");}
/* ____________________ EOF Part B _____________________ *
else{header("Location: $invalidUrl");}


I can see a few potential problem causers.

The code looks old because it’s using deprecated mysql functions instead of mysqli or PDO
The query has “LIKE BINARY” which depending on the schema might be causing a problem
The include files might be messing things up.
The $tblAdminFld looks to not be defined anywhere (in an include file?)

  • this might cause the code to not set the cookie and send users to admin.php?e0x=1 (or maybe sign-in.php?e0x=1)
    Likewise if the query fails
  • this might send users to admin.php?e0x=1 (or maybe sign-in.php?e0x=1)

To narrow things down, try temporarily adding the var_dump lines

// For Debugging ONLY
// End debugging lines
........... //the rest of the file

Don’t post any real names or passwords, just whether or not you see what you’re expecting to see.
Once you find out, change it back ASAP