I am currenty trying to make a script using mysqli, However when i run it, it returns a 500 Internal error, But when i remove the fatch_array, it runs without it. I have been using PHP.Net mysqli_ Manual. PHP Code
<?php
{ /* Global Data */
$GetPath = $_GET['p'];
$SqlUser = "root";
$SqlPass = "***********";
$SqlHost = "localhost";
$SqlData = "Site";
}
{ /* Mysql Connect */
$Sql = new mysqli($SqlHost, $SqlUser, $SqlPass, $SqlData);
if ($Sql->connect_error) { die("Sorry, Could not connect (".$Sql->connect_errno.") ".$Sql->connect_error);}
}
{ /* Test */
$Page = $Sql->real_escape_string($GetPath);
$SqlData = "SELECT * FROM pages WHERE Page = '".$Page."'";
$SqlQuery = $Sql->query($SqlData);
$Data = $SqlQuery->fetch_array(MYSQLI_ASSOC);
echo $Data['Title'];
$Sql->close();
}
?>
So what causes this? I used fefore the mysql_/ commands and now I'm switching to mysqli_*