Jump to content

Login Code Displaying Only Blank White Page no Error!


McBryver

Recommended Posts

Hello everyone,

 

When I submit my login form to go to my login page it goes to a white page and does not display an error.

 

<?php 
include("../secure/database.php");

if(!empty($_POST['loginsubmit'])){
if(!empty($_POST['email'])){

$email = securevar($_POST['email']);

if(!empty($_POST['passconf'])){

$pass = securevar($_POST['passconf']);

$q = "SELECT * FROM `accountinfo_db` WHERE `email` = '$email' AND `password` = '$pass'";

$res = mysql_query($q) or die(mysql_error());

$login = mysql_fetch_array($res);
$id = $login['id'];
$active = $login['active'];
if($id>=1){
if($active==1){
$_SESSION['logged'] = $login['id'];

$q = "UPDATE `accountinfo_db` SET `loggedtimes` = `loggedtimes`+'1' WHERE `id` = '$id'";
$res = mysql_query($q) or die(mysql_error());
$user = $login['username'];
header("Location: ../mainframe.php?strmsg=Welcome Back $user");
}else{
header("Location: activate.php");
}

}else{
   header("Location: ../index.php?strmsg=Login Information Incorrect!");	   
}

       }else{
   header("Location: ../index.php?strmsg=You did not enter a valid password!");	   
   }
   }else{
   header("Location: ../index.php?strmsg=You did not enter a valid email!");
   }
}else{
header("Location: ../index.php?strmsg=We are sorry but you are not allowed viewance of that directory!");
}
?>

 

any help would be great.

Brian

 

 

Link to comment
Share on other sites

I am using some sort of free hosting so I do not have access to the php.ini file and I have tried to echo and die the data but it does not display anything, also it works fine on my xampp local testing server but not on the hosting. I think I might need to find some other hosting service.

 

Does anyone know of a good free hosting service with instant activation and usage?

 

Thank you for the help,

Brian

Link to comment
Share on other sites

Whatever is causing the code to not work, won't change by jumping to a different host. You must find and fix whatever is causing the problem.

 

A) What do you get when you do a 'view source' of the blank page in your browser?

 

B) You can normally use a LOCAL php.ini. Have you checked the host's FAQ section at all to find out if you can use a local php,ini (sometimes it is named differently.)

 

C) Can you even put in a simple echo 'page requested'; statement at the start of your code, before any of the conditional statements and get the 'page requested' output?

 

D) It would help if you posted all the relevant code. For example, suppose there is something wrong with your form and it doesn't submit anything on the live server or your database.php file is dieing with no output/error messages?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.