![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2006
Location: UK
Posts: 18
Rep Power: 0
![]() |
Storing variables to a file?
Hi all, just a query for a friend of mine.
I know there is a way that you can pass user defined variables into PHP, and then store them as a file? For example, if you had a form like this: <form action="foo.php" method="POST"> Please Enter Your Name: <input type="text" name="name"> <input type="submit" value="Submit"> </form> Or whatever. And then you can have something like this (foo.php): <html> <body> <?php echo $_POST["name"]; ?>!!! What kind of a name is that? </body> </html> So, is there a way you can get that $_POST["name"]; to write to a file? Thanks for you help guys! :banana:
__________________
There are 10 types of people in this world: Those that understand binary And those who don't |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
look into file, fopen, fputs and fclose... as soon as you obtain the var from $_POST[] you can open a file and write the var to it.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jan 2006
Location: UK
Posts: 18
Rep Power: 0
![]() |
Oooooh, thank you very much monsieur.
__________________
There are 10 types of people in this world: Those that understand binary And those who don't |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|