Comptons_Eazy_E Posted November 27, 2009 Share Posted November 27, 2009 Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, For Example: Goto: http://ucp.south-westrp.com/UCP.php Type Username: Comptons_Eazy_E And Password: Test Now When your inside the UCP, goto Change Password, and type something. But it wont change! I have a feeling that $_POSt["fname"] is not in my ChangePass.php Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/ Share on other sites More sharing options...
rajivgonsalves Posted November 27, 2009 Share Posted November 27, 2009 I went to the url specified and type in the credentials it gave me this error though Password does not match, or there is no account! Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966224 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 I went to the url specified and type in the credentials it gave me this error though Password does not match, or there is no account! Hm, I will fix that later but do you know the answer to my question? Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966226 Share on other sites More sharing options...
rajivgonsalves Posted November 27, 2009 Share Posted November 27, 2009 I cannot say much unless I see your code or even part of it on whats going wrong. Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966227 Share on other sites More sharing options...
razta Posted November 27, 2009 Share Posted November 27, 2009 Can you not check and see if $_POSt["fname"] is in ChangePass.php? Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966228 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 Can you not check and see if $_POSt["fname"] is in ChangePass.php? This is the code(Changepass.php): <html> <head> <?php $sql = mysql_connect("BLOCKED", "BLOCKED", "BLOCKED"); mysql_select_db(BLOCKED, $sql); $fname = $_POST["fname"]; $Newp = $_POST["np"]; mysql_query("UPDATE players SET Password = $Newp WHERE Name = '$fname'"); ?> </head> <body> <a href="url">http://ucp.south-westrp.com/login.php</a> <p><center><b>_</center></p> <body background="http://img43.imageshack.us/img43/7428/hometu.jpg"> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966237 Share on other sites More sharing options...
rajivgonsalves Posted November 27, 2009 Share Posted November 27, 2009 this mysql_query("UPDATE players SET Password = $Newp WHERE Name = '$fname'"); should be mysql_query("UPDATE players SET Password = '$Newp' WHERE Name = '$fname'"); Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966238 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 this mysql_query("UPDATE players SET Password = $Newp WHERE Name = '$fname'"); should be mysql_query("UPDATE players SET Password = '$Newp' WHERE Name = '$fname'"); Still no change Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966239 Share on other sites More sharing options...
razta Posted November 27, 2009 Share Posted November 27, 2009 Try: mysql_query("UPDATE players SET Password = '$Newp' WHERE Name = '$fname';"); Note the ; Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966240 Share on other sites More sharing options...
rajivgonsalves Posted November 27, 2009 Share Posted November 27, 2009 put a die statement like mysql_query("UPDATE players SET Password = '$Newp' WHERE Name = '$fname'") or die('Error:'.mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966242 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 put a die statement like mysql_query("UPDATE players SET Password = '$Newp' WHERE Name = '$fname'") or die('Error:'.mysql_error()); Nope Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966245 Share on other sites More sharing options...
razta Posted November 27, 2009 Share Posted November 27, 2009 What was the error? Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966246 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 What was the error? No error at all, it just wont change my password Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966250 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 bump Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966384 Share on other sites More sharing options...
sasa Posted November 27, 2009 Share Posted November 27, 2009 you must pass variable value to next page via the hidden form field or via session Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966388 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 you must pass variable value to next page via the hidden form field or via session How do i do that? As i made it a variable in my login.php see: $fname = $_POST["fname"]; Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966391 Share on other sites More sharing options...
Comptons_Eazy_E Posted November 27, 2009 Author Share Posted November 27, 2009 Sorry for being inpatient but does anyone know the answer? Quote Link to comment https://forums.phpfreaks.com/topic/183075-_post/#findComment-966550 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.