Page 5 of 5 FirstFirst ... 345
Results 41 to 48 of 48

Thread: More than one input to a form question - how to process?

  1. #41
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Sorry for the long reply again Jas, had to put this on hold for a few days as work has asked of me all the hours God sends!!! Finally finished for the weekend!! So back to this.....

    Have never heard of "concat", looking at your example, I think I get what it means. But it doesn't seem to be helping me!! It hasn't changed the output at all. Output on screen is still perfect, just the text in the created file is wrong.

    Here's what it puts in file....
    PHP Code:
    username:password<br>username:password<br
    So that's everything on 1 line. The <br> should not be there at all. This should be indicating a new line needs to be started.

    Any more ideas?!?!?

    Thanks again, and sorry again for the long reply. I just have been so tired after work to even attempt to look at this until now!!

    Smithster.

  2. #42
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    '<br>' is only a newline when it is read by the browser, the browser recougnizes it as html and displays it as such. in a file '<br>' means the accual text "<br>" ('<' with a 'b' then an 'r' and a '>'). try replacing '<br>' with '/n'
    sorry for the misspellings
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #43
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks Master_script_maker, but unfortunately it does almost the same thing except it does this....

    PHP Code:
    username:password/nusername:password/

  4. #44
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    don't use
    Code:
    /n
    use
    Code:
    \n
    Notice the difference in the slash. This / is a character, this \ is an operator. Your OS might want a \r instead, if that doesn't work.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  5. #45
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Here is what I have tried...
    PHP Code:
    $content .= ''.preg_replace('/[\r\n]/','',$names[$i]).':'.crypt(preg_replace('/[\r\n]/','',$passwords[$i]),base64_encode).'\n'
    PHP Code:
    $content .= ''.preg_replace('/[\r\n]/','',$names[$i]).':'.crypt(preg_replace('/[\r\n]/','',$passwords[$i]),base64_encode).'/n'
    PHP Code:
    $content .= ''.preg_replace('/[\r\n]/','',$names[$i]).':'.crypt(preg_replace('/[\r\n]/','',$passwords[$i]),base64_encode).'\r'
    And Here is the output of each one...
    PHP Code:
    user:password\nuser:password\n

    user
    :password/nuser:password/n

    user
    :password\ruser:password\
    Each one in the output has slashes by the way, for some reason the phpcode thing omits them!

  6. #46
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I don't know why, but for some reason you have to use double quotes ( " ) in order for \r\n characters to work right. You may want to try that.

    PHP Code:
     $content .= preg_replace('/[\r\n]/','',$names[$i]).":".crypt(preg_replace('/[\r\n]/','',$passwords[$i]),base64_encode)."\r\n"
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #47
    Join Date
    Oct 2006
    Posts
    94
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you!!! This has been bugging me for a very long time!!! Finally it is now working properly.

    Thank you to Jas and to thetestingsite for all your help on this.

    Smithster.

  8. #48
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    That is a really odd bug. I'll have to keep that in mind myself. Thanks thetestingsite.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •