Original Post
Hello.
Having a rather odd issue here. At the moment im trying to relearn PHP as i haven't done it in a few years. And at the moment i'm creating a simple login form though i have issues with it all. After filling in the login information I end up at my sq-connect.php file but nothing is happening. All i get is a white screen. From my experience that mean that display_errors in php.ini isnt activated so it doesnt show whats wrong. That i have already checked. And i know you could insert ini_set('display_errors', 1) to show whats wrong. I have tried but still nothing.
Code is as follows bellow
Index.php
sq-connect.php
Anyone got a clue what im doing wrong here?
Having a rather odd issue here. At the moment im trying to relearn PHP as i haven't done it in a few years. And at the moment i'm creating a simple login form though i have issues with it all. After filling in the login information I end up at my sq-connect.php file but nothing is happening. All i get is a white screen. From my experience that mean that display_errors in php.ini isnt activated so it doesnt show whats wrong. That i have already checked. And i know you could insert ini_set('display_errors', 1) to show whats wrong. I have tried but still nothing.
Code is as follows bellow
Index.php
<form name="form" method="post" action="sq-connect.php">
Login:
<input type="text" name="LoginUser" id="LoginUser" />
Password:
<input type="password" name="PasswordUser" id="PasswordUser" />
<input type="submit" name="Send" id="Send" value="Faceroll" />
</form>
sq-connect.php
<?
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
ob_start();
// Define connection Information
$host="127.0.0.1";
$username="*****";
$password="*****";
$db_name="****";
$tbl_name="SQAccount";
// Start connection to MYSQL Server
mysql_connect("$host","$username","$password")or die("Server doesnt like what you do.");
mysql_select_db("$db_name")or die("No ice cream");
// Get info from LoginForm
$LoginUser=$_POST['LoginUser'];
$PasswordUser=$_POST['PasswordUser'];
$Encrypted_password=md5($PasswordUser);
// Check if used correct information
$sql="SELECT * FROM $tbl_name WHERE UserName='$LoginUser' and PassWord='$Encrypted_password'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1)
{
session_register("LoginUser");
session_register("PasswordUser");
header("location:opendoor.php");
}
else{
echo "Dont lie to me"
}
ob_end_flush();
?>Anyone got a clue what im doing wrong here?