php and mysql error for registration form -


when press register on php form im getting error:

warning: mysql_num_rows() expects parameter 1 resource, boolean given in /home/changj/public_html/register.php on line 26 no database selected

below register.php script line 26 unsure how fix error

if(mysql_num_rows($sql)> 0 ) { 

any ideas thanks.

i guess $sql string. try this,

$result = mysql_query($sql); if(mysql_num_rows($result)> 0 ) { .... } 

but mysql_query() deprecated of php 5.5.0. alternative use, mysqli_query() or pdo::query()


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -