Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP Problems

  • 06-11-2012 8:03pm
    #1
    Closed Accounts Posts: 1


    I'm really sorry to bother you, I wouldn't ask this if I thought I hadn't exhausted any other option but i'm starting to experience a serious problem with one of my code strings, I keep getting: The webpage at http://localhost/mmos/validate.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. I was wondering if you could spot whats going on? The page was designed to 'recieve' the link from the validating email, prompt a user for his/her password and if the password was correct activate the account, if the password was wrong, redirect the page back to itself. http://pastebin.com/uGqEh77Gcleardot.gif


Comments

  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    Check line 62, you've got two closing braces before the 'else', and a missing closing brace after it. The closing brace that's after else belongs to the parent 'if'.
    Probably what's happening is that it's unconditionally redirecting to itself over and over again.
    If you lay out your code with indents and dropped braces (below 'if' rather than after 'if'), it's a lot easier to see what's going wrong in this respect.


  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    also, 9 times out of 10, you'll want to call exit; after doing an header('Location: xxx.php"); call.

    if you don't exit php will execute the rest of the current file afterwards when that may not be the intended behaviour.


Advertisement