SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2002
    Location
    Texas
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newbie text in MySQL Question

    I have a database that accepts text entries for the title of a work. These occasionally have apostrophes ('). When I use a php form to enter these titles, it won't accept the apostrophe. How can I alter this so that I can get my text into the database the way it was intended?

    Thanks.
    Geo
    Geo

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out the magic_quotes, addslashes(), and stripslashes part of the PHP and MySQL coding tips. I think that's what's causing the trouble.

    -Helge

  3. #3
    SitePoint Member
    Join Date
    Nov 2002
    Location
    Texas
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I found out I need to quote the apostrophe. It was a silly question. Thank you for your patience.

    Geo
    Geo

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Geo
    It was a silly question.
    There are no questions that are to silly to be asked. It's the answers that might be silly.
    Todays word of wisdom

    -Helge


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
  •