I am trying to link my MySQL database to my PHP code. My friend has the same code as me and is able to connect their database to their PHP code. I end up getting a error code and do not know where I am going wrong.
This is the code that I am using
<?php
$username="root";
$password="password";
$database="account";
$connect = mysql_connect('localhost', $username, $password);
//$db-select = mysql_select_db($database,$connect) or die("Unable to select database");
$user = $_GET['user'];
$pass = $_GET['pass'];
if(!$connect) {
die('eror');
}
$db = my_sql_select_db("account", $connect)
mysql_query($db, "INSERT INTO 'account', 'tbl_account' (Username, Password) VALUES ('$user', '$pass')";);
mysql_close($connect);
?>
This is the outcome:
Parse error: syntax error, unexpected 'mysql_query' (T_STRING) in C:\Apache24\htdocs\PHP\index.php on line 11