I´m new to PHP and MySQL. I am trying to simply connect to my MySQL database I set up on hostgator. When I navigate to the .php file on the server I get this: Parse error: syntax error, unexpected T_VARIABLE on line 9
Note, I simply set up the database and assigned a user to it, no tables were added yet.
<?php $dbhost = “localhost”; $dbuser = “********”; $dbpass = “********”; $db = “********”; mysql_connect (“$dbhost”,“$dbuser”,“$dbpass”) echo “successful connection”; ?>
Thank you for any input... if the answer is obvious, please suggest hints to me, rather than give me the answer, I´m trying to get a good grasp on this stuff.

New Topic/Question
Reply


MultiQuote





|