PAGE NOT LOADING!?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cyandi_man
Forum Newbie
Posts: 12
Joined: Sun Nov 02, 2008 10:47 am

PAGE NOT LOADING!?

Post by cyandi_man »

I have a password change page that uses a php file that updates password on an mySQL database.
however when submit is hit i see the current page go blank and it does not redirect to the "password success" page. The password HAS indeed been updated - however there seems to be an issue with my header function that sends the user to the notification page. I have other sections in this website that use the EXACT same coding and it works without flaw!....eg. other member password update pages.

I am using IE - what on earth is going on??

Code: Select all

<?
$user="Proadmin";
  $host="localhost";
  $password="mypassword";
  $database = "mydatabase";
  $connection = mysql_connect($host,$user,$password)
       or die ("couldn't connect to server");
  $db = mysql_select_db($database,$connection)
       or die ("Couldn't select database");
  $db = mysql_select_db($database,$connection)
       or die ("Couldn't select database");
$clientN= $_POST['clnt'];
$user = $_POST['puser2'];
$password = $_POST['ppassword2'];
$query = "UPDATE vendors SET pass = '$password', user = '$user' WHERE vendor_number='$clientN'";
if(mysql_query($query)){
header("Location: http://provicanhealth.com/vendor_pass_successEX.php");
exit;
}
else{
header("Location: http://provicanhealth.com/vendor_passchange_errorEX.php");
exit;
}
?>
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PAGE NOT LOADING!?

Post by jaoudestudios »

Make sure no headers are being sent before your header redirect, even white space.
cyandi_man
Forum Newbie
Posts: 12
Joined: Sun Nov 02, 2008 10:47 am

Re: PAGE NOT LOADING!?

Post by cyandi_man »

jaoudestudios wrote:Make sure no headers are being sent before your header redirect, even white space.
did that ..the code above doesnt even have any spaces...
i even took out the "or die" lines just incase for some stupid reason they were causing the issue ...still no change in page behavior.
khalidmehmoodawan
Forum Newbie
Posts: 13
Joined: Thu Oct 23, 2008 3:19 am

Re: PAGE NOT LOADING!?

Post by khalidmehmoodawan »

Try using
error_reporting(E_ALL);
ini_set("display_errors", 1);

at the start of both pages.
Post Reply