Not a Member Yet,
Click here to Register

ID: 63
Viewed: 6555
Added: Jan 18, 2003
Snippet uploaded by: snippet
Written By: snippet
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

this will cycle through a file in search of the users email addy. the file is setup like this:

contents of file.txt


the script will seperate the contents form the | line and store each one in an array.
it will print to the screen when the script finds the input from the user and display that line.



echo "<html>
If ($submit){
$fileread = file("file.txt");
$arrlen = count($fileread);
For($i = 0; $i < $arrlen; && ($found==0); $i++)
$fsp = explode ('|',$fileread[$i]);
If($fsp[0] == $ID)
echo"$ID <p>ID = $fsp[0]<br> Name = $fsp[1]<br>Whatever = $fsp[2]";
$found = 1;
If (!$found) {
echo "found no matches";

}Else {
echo "<center><form action="$php_self" method="POST">";
echo "<input type=text name="ID" size=5>";
echo "<input type=submit name=submit value=submit></form>";


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2023 All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!