rahulpatel
Programmer
I have a club site that has a membership system. I would like guests to search for usernames to see if they are registered.(Only to say username is registered or not, no other details) It uses ajax (hence why this post is in this thread) to say whether or not username is regsitered. It all works, pulling the correct information but I want it to say 'username registered' or 'not registered'. Here's where I'm coming unstuck...
Hope you guys can assist me.
Code:
<?php
$sID = $_GET["id"];
$sInfo = "";
$sQuery = "Select username from members where username =".$sID;
$oLink = mysql_connect($sDBServer,$sDBUsername,$sDBPassword);
@mysql_select_db($sDBName) or $sInfo = "Unable to open database";
if($sID == '') {
$sInfo = "Member registered";
} else {
$sInfo = "Member $sID not registered.";
}
mysql_close($oLink);
?>
Hope you guys can assist me.