Thursday, 8 August 2013

PHP Syntax Check please

PHP Syntax Check please

Is this the right syntax i am sure it is but i still get mysql said i have
an error in my syntax. By the way i'm running PHP 5.4.10. I have tried
using mysql instead of mysqli but it still does not work. Any help is
greatly appreciated.
<?php
$result = mysql_query("SELECT count(*) FROM User_info");
$row = mysql_fetch_row($result);
$num = $row[0];
echo $num;
?>
It says that the error in syntax is on the second line after PHP tag.

No comments:

Post a Comment