~V+ Posted January 18, 2007 Share Posted January 18, 2007 I used to have a code for my website that would retreive information from a text bar on my website.I dont know if you understand that but its hard to explain.basically I had a text bar, like the one you put your subject in like when you make a new topic, when a button was hit it would put the information that was typed into a bar into a .txt file on my server, so I could keep track of whats going on.I was trying to re-do my website, and the guy who was hosting me deleted everything off my server, I really need this code back, can anyone help me? Link to comment https://forums.phpfreaks.com/topic/34683-i-know-this-exists-but-i-forgot-the-code-help/ Share on other sites More sharing options...
Jessica Posted January 18, 2007 Share Posted January 18, 2007 the button is a submit button on a form, then you use $_POST to get the value, and then use file writing, check out fwrite, fopen etc. Link to comment https://forums.phpfreaks.com/topic/34683-i-know-this-exists-but-i-forgot-the-code-help/#findComment-163462 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Share Posted January 18, 2007 When you submit text to a form, and it uses something like textbar.php to process it, use this code...$somevariablename = $_POST['formnamehere']Then you use the fopen and fwrite functions to write $somevariablename to the text file. Link to comment https://forums.phpfreaks.com/topic/34683-i-know-this-exists-but-i-forgot-the-code-help/#findComment-163487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.