Hi.. Newbie on PHP. Expermenting and getting error on this code from a book. What am I missing?
Why I am getting this error from this code?
Here is the error
Parse error: parse error, unexpected '$' testphp.php on line 4
Code
<html>
<body>
<?php
@ $db = mysql_pconnect('localhost', 'webuser', 'web123');
if (!$db)
{
echo 'Error: Could not connect to database. Please try again later. ';
exit ;
}
?>
</body>
</html>
Why I am getting this error from this code?
Here is the error
Parse error: parse error, unexpected '$' testphp.php on line 4
Code
<html>
<body>
<?php
@ $db = mysql_pconnect('localhost', 'webuser', 'web123');
if (!$db)
{
echo 'Error: Could not connect to database. Please try again later. ';
exit ;
}
?>
</body>
</html>