Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Redirect if record already exists in database

$
0
0

I have the following snippet of code that I *think* is right, but being new to PHP I just wanted if someone could let me know if this is indeed correct.

 

I'm simply redirecting the user if they are already a member (email exists in the db)

$r=query_wrapper("SELECT * FROM tblmembers WHERE mem_email = ?",$mem_email);
$rstDBEdit=mysql_fetch_assoc($r);

if($rstDBEdit)
redirect("/message.php?message=already_a_member");

Viewing all articles
Browse latest Browse all 13200

Trending Articles