View Full Version : Php Help With Retrieving Info From The Server?

11-15-2007, 05:01 PM
I am using a flat file (txt file) to send & receive info from the server, but what i want to is, when the customer registers and sends a name or email using a form and a POST method, they will receive a message that they have been registered and to log in, but when they log in , all the data that is in the txt file shows, and i want just the name of the user to show. this is what i have at present but it isnt working right? an ideas please!!


<form action="testlogin.php" method="get">
Surname: <input type="text" name="name" />
Sex (M/F): <input type="text" name="sex" />
<input type="submit" />

$file = fopen("welcome.txt", "r");
if(!$file) {
print "error! The file could not be opened";

// read file and print, line by line

$text = fgets($file);
echo $text . "

11-15-2007, 05:44 PM
We need to know what your text file looks like.
Cut and paste in a post.

11-15-2007, 06:26 PM
text file is this:

|1 |11|21|31|41|51|71|81
|2 |12|22|32|42|52|72|82
|3 |13|23|33|43|53|73|83
|4 |14|24|34|44|54|74|84
|5 |15|25|35|45|55|75|85
|6 |16|26|36|46|56|76|86
|7 |17|27|37|47|57|77|87
|8 |18|28|38|48|58|78|88
|9 |19|29|39|49|59|79|89

11-15-2007, 06:27 PM
This looks (http://www.codingforums.com/showthread.php?t=127896) familiar (http://www.codingforums.com/showthread.php?t=127895)...

11-15-2007, 06:46 PM
Maybe it's homework.

11-15-2007, 08:42 PM
Which one is the name of the user?

"Welcome 1 to my website"?

11-15-2007, 08:53 PM
Sorry that was the wrong text file, the text file i have has only one customer which i posted to the text file myself to test how to send info by using the post method

11-16-2007, 12:47 AM
well? let's see that file then.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum