SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing email address through URL to $_GET

    Ok this may not even be my problem. I am an old newbie... It doesn't make sense I know. I am coming back to php after a few years of absence.

    I have an email that gets sent out to validate a user account.

    The validation string is http://www.thedomain.com/validatescript.php?action=activate&user=emailaddy@myemailaddress.com&code=validationstringalljumbledup

    I have looked at every single thing I can look at, the validate script should check the database for the email address, use the validationstring to make sure it is the right person, and mark a 1 in the is_validated field of the database to allow the user to login to the site.

    Problem being, I get a blank page.

    Am I getting the blank page because of the email address in the string? Or do I need to dig deeper? If I try a var_dump($_GET) I still am getting a blank page, which leaves me to believe that it is choking on the email address in the string?

    Correct?

    If so, how can I pass that email address (because it *IS* the username) through the URL to the script with out the script choking, or MySQL choking?

    TIA

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    completely blank page when there should be something output no matter what, is often a parse error.

    your server probably has the display_errors setting turned off, and why you dont get an error.

  3. #3
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There's nothing wrong with that URL. You can put an e-mail address in a URL. You might want to urlencode() it to be safe, but characters not allowed in a URL won't stop the script from running entirely.

    That means the problem is somewhere in your code, which I can't see

  4. #4
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appreciate the help, I am impressed with sitepoint, just found it tonight!

    I will look into the display_errors setting and try and get some more info on what is happening, or not happening for that matter.

    If I can't figure it out on my own, I will be sure to come post some code!

    Again, appreciate the input!

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    set error_reporting to E_ALL while your at it. great setting for coding/debugging.

  6. #6
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    As an aside, I personally wouldnt send an email address in a URL, I'd use a ref number instead, especially as the email address is your login, the less you give away the better and you've just given away half of your security !!!!

    As for your problem, post the code.

    Hope it helps

    Terry
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats funny! !!!heheheh
    Last edited by the311guy; Jan 11, 2007 at 06:15. Reason: hehehehheheheheh

  8. #8
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mandes View Post
    As an aside, I personally wouldnt send an email address in a URL, I'd use a ref number instead, especially as the email address is your login, the less you give away the better and you've just given away half of your security !!!!

    As for your problem, post the code.

    Hope it helps

    Terry
    Thanks for the tip. Def. a good idea. I will change it to send the numbered id out of the database, either way it is unique.

  9. #9
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again. display_errors helped a ton. Unfortunatly, I am almost too embarrassed to say what the problem ended up being

  10. #10
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mandes View Post
    As an aside, I personally wouldnt send an email address in a URL, I'd use a ref number instead, especially as the email address is your login, the less you give away the better and you've just given away half of your security !!!!

    As for your problem, post the code.

    Hope it helps

    Terry

    hmmmmm

  11. #11
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by the311guy View Post
    hmmmmm
    Does anyone know?

  12. #12
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jacob View Post
    Does anyone know?
    I'm lost

  13. #13
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is this some type of poorly executed spamming attempt?

  14. #14
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Is this some type of poorly executed spamming attempt?
    It has to be... I was pretty sure this thread was dead...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •