My page is all blank because of this piece of code:
$coins = '2';
$vote_site = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';
$account = $_POST['name'];
$account = mysql_real_escape_string($account);
$conn = mysql_connect($dbhost, $dbuser, $dbpassword) or die ('mySQL Connecting Error');
mysql_select_db($database);
$ip = $_SERVER['REMOTE_ADDR'];
if(isset($_POST['submit']) && strlen($account)>=4){
$search = mysql_query("SELECT * FROM account.account WHERE login = '$account' LIMIT 1");
if (mysql_fetch_array($search) !== false){
$insert = mysql_query("INSERT INTO account.account SET coins = "'.$coins.'" WHERE login = "'.$account.'"") or die(mysql_error);
header("Location: http://' .$vote_site. '");
}else{
echo "Conta nao existe!";
}
}elseif (isset($_POST['submit']) && strlen($account)<4){
echo "<font color='red'>Conta inválida!</font>";
}
I have a html form, its supose to insert some values in a table and redirect to a website, but all I get is a white page.
I already tried all the ways to report errors, but it won't display anything!