1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

syntax question

Discussion in 'PHP' started by Toddie, Feb 21, 2010.

  1. Toddie

    Toddie New Member

    Joined:
    Jan 9, 2010
    Messages:
    52
    Likes Received:
    2
    Trophy Points:
    0
    fwrite($handle,$_POST["usersname"]);

    I want to add a carriage return to the end of the data in the variable "usersname" but I do not know where to add the /n

    oops i figured it out
    fwrite($handle,$_POST["usersname"]."\n");
     
    Last edited: Feb 21, 2010
  2. rekha_sri

    rekha_sri New Member

    Joined:
    Feb 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I tried the below line in my program. It is working correctly.

    fwrite($file,$_POST["my_name"]."\n");
     
  3. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    17
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    Toddie has already figured it out...
     
  4. Toddie

    Toddie New Member

    Joined:
    Jan 9, 2010
    Messages:
    52
    Likes Received:
    2
    Trophy Points:
    0
    yeah, you can totally close this thread.

    php noob that I am... i figured it out slightly after posting it since i tried a bunch of different combinations while i was waiting for an answer... and I got it to work.

    but GUESS WHAT... i have a new issue with another script.
    new thread appropriate.
     

Share This Page