why adding slashes before inserting into database

Discussion in 'PHP' started by alanX, Jun 5, 2006.

  1. #1
    Hi:
    i have a question about function addslashes(): why we need to format the
    values(e.g String) with addslashes() before inserting into the database.

    I have tried to insert data into db by doing these two different ways.
    (1): with addslashes();
    (2): without addslashes();
    But i can not feel any difference.

    Why?
     
    alanX, Jun 5, 2006 IP
  2. SecondV

    SecondV Active Member

    Messages:
    76
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    70
  3. mohdsoft

    mohdsoft Peon

    Messages:
    404
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    mohdsoft, Jun 5, 2006 IP