I have 3 columns in my table username, password and element. The value of element is 1. So I created a webpage If user insert the correct username and password I want my PHP to check that If element = 1 then do something I want and change element to 0. But If it is 0 so PHP do nothing. My problem is it's display white screen.
<?php
require_once("function/func_connect.php");
require_once("function/func_check.php");
require_once("function/websend.php");
$objLogin = checkPassword($_POST['user_name'],$_POST['user_password'],$Cfg["table"]["user"]);
if($objLogin == false)
{
include("state/login_failed.html");
exit();
}
if($objLogin == true)
{
// I think the problem cause here How do I fix?
mysql_query("SELECT element FROM authme WHERE username = $_POST['user_name']");
echo "success";
}
mysql_close();
?>
Thank you and sorry for my bad english.