I’m trying to create a database. But i get an error while i’m doing.
This is the code :
<?php
$link = mysql_connect("localhost","xxx","xxx")
$db_selected = mysql_select_db("alpMuhendislik",$link);
if (!$db_selected) {
$sql = 'CREATE DATABASE alpMuhendislik';
if (mysql_query($sql, $link)) {
echo "Database alpMuhendislik created successfully\n";
}
else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
}
?>
And this is the error :
Parse error: syntax error, unexpected T_VARIABLE in …./load_data.php on line 3
I just couldn’t see any problem about syntax. I checked marks and semicolons.
Thanks!
Missing
;:“Unexpected something on line x” typically means there’s a problem on line x-1.