PHP reading in a txt, looking after the text, and deleting..
Posted: Mon Feb 28, 2005 6:13 pm
This gathers the provided key from the registration form:
Now, I need to make a file, with some keys looking like this:
XXXX-XXXX-XXXX , the list will be something like this:
And so on. Now I need someway to make the PHP read from the TXT file, and compare the given key, with the once in the list. If the key does not exist, the php wont care, and just continue with the variable: $gm = "0";
If it was true, then the variable becomes: $gm = "6"; and the line with the key is beeing deleted.
Now, I need help making that script, help me!
Code: Select all
$gmkey1 = $_POSTї'gmkey1'];
$gmkey2 = $_POSTї'gmkey2'];
$gmkey3 = $_POSTї'gmkey3'];
$gmkey = "$gmkey1-$gmkey2-$gmkey3";XXXX-XXXX-XXXX , the list will be something like this:
Code: Select all
1234-1234-1234
3214-3214-3214
4567-4567-4567
6547-6547-6547If it was true, then the variable becomes: $gm = "6"; and the line with the key is beeing deleted.
Now, I need help making that script, help me!