Page 1 of 1

Match code in link with code with one in file and extract li

Posted: Fri Oct 23, 2009 9:38 am
by Peuplarchie
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!

Re: Match code in link with code with one in file and extract li

Posted: Fri Oct 23, 2009 7:49 pm
by requinix
It'd be easier with a database...

Open up the file, pretend it's CSV, and look for the code.
Meanwhile open up another file and dump each line from the other file into it - except for the one with the matching code. Then overwrite the original file with the temporary file.