SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot vodica's Avatar
    Join Date
    Jul 2001
    Location
    SLovenia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Urgent Help Please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Hello!

    Okay, here is the deal!

    With this
    Code:
    <?php
    
    $sql = "INSERT INTO book SET " .
    "NAME='$name', " .
    "AUTHOR='$author', ".
    "ISBN='$isbn', ".
    "STARS='$stars', ".
    "DESCRIPTION='$desc', ".
    "PRICE='$price', ".
    "CATEGORY='$name2', ".
    "URL='$link', ".
    "IMAGEs='$images', ".
    "IMAGEl='$imagel'";
    if (mysql_query($sql)) {
    echo("<P><b>Vnos je bil uspešno dodan!.</b></P>");
    } else {
    echo("<P><b>Vnosa ni bilo mogoče oddati, MySQL pravi: " .
    mysql_error() . "</b></P>");
    }
    ?>
    i cannot insert ' into my database! CAN SOMEONE TELL ME WHY?

    I can do everything else normaly but not this! NO!
    while(true) sheep++;

  2. #2
    SitePoint Enthusiast Stallion's Avatar
    Join Date
    Jan 2001
    Location
    Cumberland, RI, US
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Double post.

    See the other thread.

  3. #3
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    What error message do you receive?

    John

  4. #4
    SitePoint Zealot vodica's Avatar
    Join Date
    Jul 2001
    Location
    SLovenia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank you!

    Stalion helped me!
    I kept recieving just that I have the error! Nothing else!

    I had to ad a ".addslash($variable)
    thanks anyway
    while(true) sheep++;

  5. #5
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    To addslash, for example,
    $abc = AddSlashes($abc);

    Do it before you insert, that's all. If you still have error, let us see some lines before and after ther insert statement.

    John

  6. #6
    SitePoint Enthusiast Stallion's Avatar
    Join Date
    Jan 2001
    Location
    Cumberland, RI, US
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rrrrrright.

  7. #7
    SitePoint Zealot vodica's Avatar
    Join Date
    Jul 2001
    Location
    SLovenia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SORRY!

    OKAy! I'll change it :9

    Where do I do this?
    Last edited by vodica; Jul 7, 2001 at 12:04.
    while(true) sheep++;


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
  •