yanti Posted June 9, 2010 Share Posted June 9, 2010 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 More sharing options...
JasonLewis Posted June 9, 2010 Share Posted June 9, 2010 Seems like it doesn't work isn't a good indication of what it is/isn't doing. Sorry, I could probably look at the code and see what's wrong. But I'm not, because you didn't give enough information. Link to comment https://forums.phpfreaks.com/topic/204262-checking-for-available-data/#findComment-1069832 Share on other sites More sharing options...
yanti Posted June 9, 2010 Author Share Posted June 9, 2010 sorry for the lack of info. by the way, i want to match the input with database. if match, message saying that u are registered. if not, it will display a message to ask them to register. whenever i run the code, seems like checking part doesnt work. Link to comment https://forums.phpfreaks.com/topic/204262-checking-for-available-data/#findComment-1069834 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.