Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats wrong with this statement?

Status
Not open for further replies.

mwesol

IS-IT--Management
Nov 16, 2000
46
US
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>
 
Thanks! That fixed it! The book is was wrong.


2nd question: What port needs to be open for MYSQL? is it 1433 like MSSQL?

Thanks
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top