cyandi_man Posted December 3, 2008 Share Posted December 3, 2008 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?? <? $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; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/ Share on other sites More sharing options...
.josh Posted December 3, 2008 Share Posted December 3, 2008 Do you have this script included in some other script that has output before the header? Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/#findComment-704934 Share on other sites More sharing options...
PFMaBiSmAd Posted December 3, 2008 Share Posted December 3, 2008 When learning php, developing php code, or debugging a problem with php code (as in this case), turn on full php error reporting to get php to help you. Set error_reporting to E_ALL (or the equivalent numeric value when done in a .htaccess file) and set display_errors to ON. Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/#findComment-704957 Share on other sites More sharing options...
revraz Posted December 3, 2008 Share Posted December 3, 2008 Obviously your Caps Lock key works, so really no need to put your Subject in all Caps, unless you think your issue is more important than everyone else's. Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/#findComment-704958 Share on other sites More sharing options...
Mark Baker Posted December 3, 2008 Share Posted December 3, 2008 When learning php, developing php code, or debugging a problem with php code (as in this case), turn on full php error reporting to get php to help you. Set error_reporting to E_ALL (or the equivalent numeric value when done in a .htaccess file) and set display_errors to ON. And don't forget that php -l <filename> from the command line is your friend Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/#findComment-704986 Share on other sites More sharing options...
cyandi_man Posted December 4, 2008 Author Share Posted December 4, 2008 When learning php, developing php code, or debugging a problem with php code (as in this case), turn on full php error reporting to get php to help you. Set error_reporting to E_ALL (or the equivalent numeric value when done in a .htaccess file) and set display_errors to ON. thanks ..im totally new to coding ...php especially. this is done on the server right? if i have my site up with a hosting company - shouldnt this be already on? or not necessarily? I also have not set up a testing server on my cpu. Quote Link to comment https://forums.phpfreaks.com/topic/135341-page-not-loading/#findComment-705661 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.