EpicZebra Posted April 12, 2008 Share Posted April 12, 2008 How can I make it saves the users input to a text file. It would save the input in the HTML text box "name" and "email". Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/ Share on other sites More sharing options...
AndyB Posted April 12, 2008 Share Posted April 12, 2008 http://ca.php.net/manual/en/function.fwrite.php explains with example code Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/#findComment-515343 Share on other sites More sharing options...
EpicZebra Posted April 12, 2008 Author Share Posted April 12, 2008 [EDIT] It works but how do i make it save from an HTML Form input? Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/#findComment-515344 Share on other sites More sharing options...
AndyB Posted April 12, 2008 Share Posted April 12, 2008 By passing the form data to the file write function. Any HTML form can do that. Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/#findComment-515345 Share on other sites More sharing options...
EpicZebra Posted April 12, 2008 Author Share Posted April 12, 2008 Is there an example some where? I don't really use Forms and I just need a quick save to file. Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/#findComment-515346 Share on other sites More sharing options...
AndyB Posted April 12, 2008 Share Posted April 12, 2008 <form action="save_this.php" method="post> Your name: <input type="text" name="your_name"/> <input type="submit" name="submit" value="GO"/> </form> There are more form tutorials on the internet than I've had hot dinners. save_this.php is the name of the script you wrote based on the file write info already provided. Link to comment https://forums.phpfreaks.com/topic/100752-input-to-text-file/#findComment-515489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.