Computing.Net > Forums > Programming > PHP simple file WTF

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP simple file WTF

Reply to Message Icon

Name: Leith_Jones
Date: January 13, 2005 at 20:41:49 Pacific
OS: windows 2grand
CPU/Ram: 866/256
Comment:

you guys, i'm a total newb to php and i cant for the life of me figure out how to write to a file... :S heres a list of the files i have so far

php.html
welcome.php
userfile(no extension)

ok the html i have is straightforward..


[html][head][/head]
[body]
[form action="welcome.php" method="POST"]
[input type="text" name="login"][br]
[input type="text" name="passwd"][br]
[input type="submit"][br]
[/body]
[/html]

and my php is


(angle bracket)?
$name=$_POST["login"];
$PASS=$_POST["passwd];

$f=fopen("userfile","ab");
fwrite($f,$name\r\n$PASS);
fclose($f);
?(angle bracket)

just as a note, this script is running off of a learning windows system



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: PHP simple file WTF

PHP: File into array problem www.computing.net/answers/programming/php-file-into-array-problem/15399.html

Need help using PHP? PLEASE www.computing.net/answers/programming/need-help-using-php-please/9319.html

php help www.computing.net/answers/programming/php-help/9515.html