...

View Full Version : Match code in link with code with one in file and extract line



Peuplarchie
10-23-2009, 03:39 PM
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!

Fumigator
10-23-2009, 04:08 PM
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'].



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum