Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    need to input more than 255 characters using apostrophes as part of text

    I need to input more than 255 characters into mysql and so I use the data type text. But if this text input has an apostrophe in it, this stops the input as it acts as a stop to the insert. How does one allow persons to input large amounts of text and use apostrophes without having to worry about inserting back slashes every time one appears?

    Using several books to learn PHP and MySQL I've managed to build a database and perform many different searches successfully but I can't seem to figure out this hopefully "simple" thing.

  • #2
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    addslashes() maybe?
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #3
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Or htmlentities() ???

  • #4
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you me' and bcarl314 for these suggestions... I have briefly read over these 2 functions and they both make sense. I'm sure I will now be able to accomplish what I need due to your suggestions so thank you for saving me leaps of time... happy holidays!


  •  

    Posting Permissions

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