Quick question

Discussion in 'PHP' started by phelixx, Dec 17, 2007.

  1. #1
    Would anyone have any idea what is prventing this query from being inserted into mysql? I am trying to insert html into a mysql database. I am running these commands around the contents:

    $content = $_POST['FCKeditor1'];
    $content = htmlspecialchars($content);

    and this is the query that it shows when doing a view source.

    insert into front ('content','title','thedate') values ('<p> </p>
    <table cellspacing=\"1\" cellpadding=\"1\" width=\"200\" border=\"1\">
    <tbody>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </tbody>
    </table>','rterte','1197964757')


    Thanks.
     
    phelixx, Dec 17, 2007 IP
  2. WeBuster

    WeBuster Member

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    You dont need the htmlspecialchars, I think FCKeditor doing it for you.
     
    WeBuster, Dec 18, 2007 IP
  3. phelixx

    phelixx Well-Known Member

    Messages:
    197
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    125
    #3
    I just figured out my problem. Very stupid mistake of me but in the insert statement before the values I should not be putting ' ' around the items. Thanks for the help though.
     
    phelixx, Dec 18, 2007 IP