Jump to content

Trying to get this to Write and I have something wrong it in keep getting a erro


Recommended Posts

<?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\">"; ?>

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??  :P

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.

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).

<?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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.