Sassy34 Posted December 7, 2009 Share Posted December 7, 2009 <?php$lname=$_POST["LastName"];$fname=$_POST["FirstName"];$add=$_POST["StreetAddress"];$file=fopen("111.txt","a+") or exit("Unable to open file!");/*while(!feof($file)) { echo fgets($file)."<br>"; }*/ write.($file,$lname);<br> fwrite($file,$fname);<br> fwrite($file,$add);<br> fclose($file); echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=teleform.html\">"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/ Share on other sites More sharing options...
premiso Posted December 7, 2009 Share Posted December 7, 2009 Indent your code properly, use the tags and then reply to this topic with the proper indentation of the code and in the proper tags and you may get some help. Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-972912 Share on other sites More sharing options...
cags Posted December 7, 2009 Share Posted December 7, 2009 It may also help if you told us what error you are recieving. Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-972914 Share on other sites More sharing options...
mrMarcus Posted December 7, 2009 Share Posted December 7, 2009 It may also help if you told us what error you are recieving. what do you mean? you couldn't figure out the problem from the title of the thread alone?? Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-972918 Share on other sites More sharing options...
cags Posted December 7, 2009 Share Posted December 7, 2009 It may also help if you told us what error you are recieving. what do you mean? you couldn't figure out the problem from the title of the thread alone?? I think I drowned my psychic powers with Jack Daniels over the weekend. Hopefully by the end of the week they'll find their way back through the fog. I could probably work the problem out from the code (infact theres more than one thing that stands out at a glance). But given the amount of effort taken by the OP I'm not feeling especially inclined to. Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-972922 Share on other sites More sharing options...
premiso Posted December 7, 2009 Share Posted December 7, 2009 Well, to be honest, I probably could have figured out the problem with the code, if it was indented properly (or at least setup on multiple lines) and was easier to read. As I can see there is a write <br> etc through out the code that I do not know if it is apart of the code. If it is that is where most of the errors lay, but given the disregard of the help he wants to receive, by not reading the rules before posting and not taking the time to clean up his code a little bit, well yea, no help will come (at least I hope none will come). Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-972924 Share on other sites More sharing options...
blueman378 Posted December 7, 2009 Share Posted December 7, 2009 <?php $lname=$_POST["LastName"]; $fname=$_POST["FirstName"]; $add=$_POST["StreetAddress"]; $file=fopen("111.txt","a+") or exit("Unable to open file!"); /*while(!feof($file)) { echo fgets($file)."<br>"; }*/ fwrite.($file,$lname); /*was missing the f on this line */ fwrite($file,$fname); fwrite($file,$add); fclose($file); echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=teleform.html\">"; ?> Dunno if thats your only problem, but next time, put some effort into asking for help. I'm being nice cause your new, but Read the rules before you post! Quote Link to comment https://forums.phpfreaks.com/topic/184272-trying-to-get-this-to-write-and-i-have-something-wrong-it-in-keep-getting-a-erro/#findComment-973112 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.