更新查询(不工作)

时间:2016-02-09 11:50:48

标签: php sql database

我正在尝试创建CMS,但是当我将 inkoop更改为时,它不会更新数据库。

你在我的SQL查询中看到了什么问题吗? 我已经尝试了很多改变,甚至把``置于desc值,但没有任何反应。

以下是代码:

 <?php
    $prodid = $_GET['prodid'];
    if(isset($_POST['submit'])) {
        $shopid1 = $_POST['productid'];
        $prodname1 = $_POST['productname'];
        $desc1 = $_POST['desc'];
        $fprice1 = $_POST['fprice'];
        $price1 = $_POST['price'];
        $inkoop1 = $_POST['inkoop'];
        $image1 = $_POST['image'];
        $qty1 = $_POST['qty'];
        $html1 = $_POST['html'];
        $author1 = $_SESSION['name'];


        $result = mysql_query("UPDATE products SET shopid='$shopid1', name='$prodname1', qty='$qty1', price='$price1', `desc`='$desc1', fprice='$fprice1', inkoop='$inkoop1', image='$image1', author='$author1', html='$html1' WHERE id=$prodid");

            Header("Location: products.php");

    } else {

    }

    ?>

0 个答案:

没有答案
相关问题