SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sending a line break value through a form

    A form has options for which delimiter the user wants to use in a list they are transmitting. One of these options is a carriage return, which is then posted to a php script. I am able to do this without using the form by typing %0D%0A directly into the url bar as a value for the posted delimiter.
    However, when I attempt to use this as a value submitted by the form the % symbols are replaced with %25 in the url bar. Is there any way to prevent this? I thought that setting the enctype of the form to "text/plain" would solve it but it didnt.

    Thanks alot, please tell me if I havent been clear enough in my question

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Why can't they just press the enter key to insert a line break in a textarea?

  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Id like to keep the options for delimiters as radio buttons for the sake of usability, although using a textarea for inputting delimiters does work perfectly.

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Your radio buttons don't need to send the actual delimeters themselves; they can simply be words that you use in processing to choose which delimeter to apply to the data.

  5. #5
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think ill use a textarea which can be filled in manually and with radiobuttons. Shouldve thought about it a bit more before posting here I guess although Im still curious about how to fix the original problem
    Thanks alot for your help!


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
  •