nvidia Posted December 23, 2006 Share Posted December 23, 2006 Hi, i have a form where people selects values via radio buttons. When they press submit it should be stored in a text file. How do i insert a line break so that every time they press submit, each value will be on a separate line?form1.html Mr.X <input type="radio" name="select" value="Mr.X " CHECKED> <br />Tom Cruis <input type="radio" name="select" value="Tom Cruis " ><br />handler1.php file session_start();$selection = $_POST['select'];// store location of file in variable$filename= "/home/eland/u1/kbccs/w1009048/public_html/Internet_Pg/C2/C2.txt"; $fp = fopen($filename,'r+); $write = fwrite($fp, "$selection\r\n");At the moment when they select a second value, it goes onto another line, but i only see it partially in the C2.txt file.For exampleMr.X isPlease help anybody :( Link to comment https://forums.phpfreaks.com/topic/31684-solved-inserting-line-breaks-into-a-txt-file/ Share on other sites More sharing options...
nvidia Posted December 23, 2006 Author Share Posted December 23, 2006 This problem is now solved, which i realised after i had posted. Please disregard this post by me.Thank you Link to comment https://forums.phpfreaks.com/topic/31684-solved-inserting-line-breaks-into-a-txt-file/#findComment-146867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.