Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    262
    Thanks
    23
    Thanked 1 Time in 1 Post

    Post Match code in link with code with one in file and extract line

    Good day you all,
    I work on a email confirmation system, I'm stuck on the part of matching the code in the confirmation link with the one in the file so I can find which line to move from the pending file to the confirmed file.

    the lines in the file looks like that :

    name, email, code
    name, email, code

    and the link look like :
    http://mysite.com/confirmed.php?code=123456

    How can I look for the line in the file that match the code in the link

    Thanks!

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You can read a record using fgetcsv():

    http://us3.php.net/manual/en/function.fgetcsv.php

    Which will then put that code into the third position in an array, which you can compare against $_GET['code'].


  •  

    Posting Permissions

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