Jump to content

checking for available data


yanti

Recommended Posts

hi guys, i had this code to check the match data and display the message.

seems like it doesnt work.

mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");


$num=$_POST['txtMobile'];
$sql = mysql_query("SELECT * FROM $tbl_name WHERE Mobile='$num'");
$result = mysql_query($sql);
$count=mysql_num_rows($result);

if($count==1){
echo "You are a member of Roadwinner.";
}
else {
echo "Sorry, you are not a member of Roadwinner. To register as a member, please send via sms, ON SPOT send to 32425."; 
}

 

Link to comment
https://forums.phpfreaks.com/topic/204262-checking-for-available-data/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.