Jump to content

load page or not


Gatsu

Recommended Posts

if(!($pa==$_GET['pass'])) die("Wrong password...");

But in the end I would suggest you implement softer validation so that it, say, brings the client back to the login form.

Link to comment
Share on other sites

How come I always get to the "Wrong password..." when I use this code?the form is name="pass2"

$pa = mysql_query("SELECT pass FROM annons WHERE id=".$_GET['id']."");$ap = $_REQUEST['pass2'];if(!($pa==$ap)) die("Wrong password...");

Link to comment
Share on other sites

Because $pa is a MySQL resource, not a string. You have to extract the string somehow, e.g.

$pa = implode(mysql_fetch_assoc(mysql_query("SELECT pass FROM annons WHERE id=".$_GET['id']."")));

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...