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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -