jakeisstoked
Technical User
Hi,
I'm trying to connet to a MySQL database using a dsn-less connection and I keep getting the following error:
Parse error, syntax_error, unexpected T_VARIABLE in C:\Inetpub\ on Line 10
This is how my connection looks:
********************************************
<?PHP
$conn = "DRIVER={MySQL};\
SERVER=localhost;\
DATABASE=test;\
USER=root;\
PASSWORD=xxx;\
OPTION=3;"
$conn->open($conn);
?>
********************************************
Is my code wrong?
-Jake
I'm trying to connet to a MySQL database using a dsn-less connection and I keep getting the following error:
Parse error, syntax_error, unexpected T_VARIABLE in C:\Inetpub\ on Line 10
This is how my connection looks:
********************************************
<?PHP
$conn = "DRIVER={MySQL};\
SERVER=localhost;\
DATABASE=test;\
USER=root;\
PASSWORD=xxx;\
OPTION=3;"
$conn->open($conn);
?>
********************************************
Is my code wrong?
-Jake