Welcome! Log In Create A New Profile

Advanced

login does not work anymore

Posted by 46296433 - Julia 
Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
login does not work anymore
May 14, 2013 04:09PM
I need help please!
My login page doesn't work anymore.
Yesterday it was working properly,but i had a problem with inserting players in the database.So i left the computer on and went to sleep.
This morning, nothing is working anymore.
The index page is working and take me to the login page but when i try to login with the admin username and admin password,nothing is happening anymore.Don't know what to do and time is runningthumbs down
avatar Re: login does not work anymore
May 14, 2013 08:40PM
You are going to have to be way more spesific than that. Saying something worked and now it doesn't gives us no indication whatsoever, as it could be one of a hundred things. If your login page displays correctly but nothing happens when you click submit it is most likely a databse issue. Or your code for the submit button isn't there/incorrect. Is the login page table in your database still there ? Did you perhaps not delete the include part at the top of the page ? Do you get any error messages at all ? Are your other database functions on other pages still working ?
??
Re: login does not work anymore
May 15, 2013 02:48PM
hello!sorry i was not very specific.My login page is displaying correctly but nothing is happening anymore when i press the submit button and i didn't modify my code at all.
the databse is still linked with the page.I have the include part to the connect.php and the connect.php is well programmed.That is why i don't understand a thing.
I don't know if i have to delete everything and reprogramme from the beginning.I'm just worried about the time and i'm writting other subjects...
Here is my code:
Language: PHP
<?php include("connect.php");//include database connection session_start(); //initialize session if($_SERVER["REQUEST_METHOD"] == "POST") {   // username and password sent from Form//   $myusername=addslashes($_POST['username']); $mypassword=addslashes($_POST['password']);   $sql="SELECT id FROM login WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $active=$row['active']; $count=mysql_num_rows($result);       // If result matched $myusername and $mypassword, table row must be 1 row//   if($count==1) { session_register("myusername"); $_SESSION['login_user']=$myusername;   header("location: welcome.php"); } else { $error="Your Login Name or Password is invalid"; } }   ?> <html> <form action="" method="post">   <label>UserName :</label>   <input type="text" name="username"/><br />   <label>Password :</label>   <input type="password" name="password"/><br />   <input type="submit" value=" Submit "/><br />   </form>
Hope i can get some helpspinning smiley sticking its tongue out

</html>
avatar
Mac
Re: login does not work anymore
May 15, 2013 06:08PM
You shoudl learn the value of error checking to point out where the error is

Language: PHP
if($_SERVER["REQUEST_METHOD"] == "POST") { //do this } else { echo "No submit request";

When you have found the answer, you remove the else.

In any case, I do not see a closing bracket
Re: login does not work anymore
May 16, 2013 08:28AM
Thank you Mac! I managed to find where i missed the bracket,now another problem has arise!
As soon as I click on submit,I receive another webpage error sayin that This webpage has a redirect loop
The webpage at http://127.0.0.1/welcome.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this webpage later.
Learn more about this problem.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
I even tried to cleared the cookies on that page but it still stuck and does not work.I am starting to worry because of the time!Please heeeellllllllllllllllllllllllllllllllppppppppppppppppppp!!!!!
avatar Re: login does not work anymore
May 16, 2013 01:29PM
This usually happens when your page redirects to another page which then redirects back to the same page which then redirects back to the other page etc. causing an infinite loop. It could be something to do with a page in your internet cache too.

Try, downloading "ccleaner" (google for it - it is a small download) and use it to clean out all your browsers cookies AND cache. If that doesn't work, try disabling your security software temporarily and see if it works. Finally, try using a different browser if all else fails.
Re: login does not work anymore
May 17, 2013 11:29AM
Thanx alots,i've tried everything you suggest but nothing is working!!!thumbs down
Sorry, only registered users may post in this forum.

Click here to login