I have decide to update my old MySQL code to mysqli but when creating a SELECT query it is just showing a white page here is my code
<?php
session_start();
include('./includes/connections.php');
error_reporting(-1);
ini_set('display_errors',1);
$chk_name = $db->prepare("SELECT `playerid`
FROM `members`
WHERE `playername` = '?' ||
`player_login_name` = '?'";
$chk_name->bind_param($_POST['name'],$_POST['name'])
$chk_name->execute();
$chk_name->fetch();
$exsist = $chk_name->num_rows;
if($exsist)
{
echo " Sorry, This username is already in use.<br/>
»<a href='home.php";
if($_GET['PID']) { echo '?PID=' . $_GET['PID']; } echo "'>Okay</a>";
}
else{
echo "username available";
}
here is my connection script `
<?php
$db = new mysqli("localhost", "******", "*****", "******");
if($db->connect_errno > 0) {
die('Connection failed [' . $db->connect_error . ']');
}