I am using Godaddy hosting, PHP 5.
I have tried numerous codes, but this is the one given to me by the Godaddy website itself and it is still not working.
<?php
//same database connection for PHP and MySQl.
//Connect To Database
$hostname="myhostname";
$username="myusername";
$password="mypass";
$dbname="mydatabase";
After I do this I get this error message...
Error
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
//same database connection for PHP and MySQl.
//Connect To Database
$' at line 1
Everytime I try a code I get an error in my SQL syntax, but there should be no error at all...I have no clue what is going on.
I have tried numerous codes, but this is the one given to me by the Godaddy website itself and it is still not working.
<?php
//same database connection for PHP and MySQl.
//Connect To Database
$hostname="myhostname";
$username="myusername";
$password="mypass";
$dbname="mydatabase";
After I do this I get this error message...
Error
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
//same database connection for PHP and MySQl.
//Connect To Database
$' at line 1
Everytime I try a code I get an error in my SQL syntax, but there should be no error at all...I have no clue what is going on.