Jump to content

gcxlovexxx

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by gcxlovexxx

  1. I have already solve it.. but i have new problem now..

     

    Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Quantity='10' WHERE ProductCode='F01'' at line 7

     

    This is my Code

     

    $query = mysqli_query($con,"UPDATE product SET

    ProductName='$_POST[PN]',
    ProductClass='$_POST[PCL]',
    ProductStatus='$_POST[PS]',
    ProductPrice='$_POST[PP]',
    ProductInPrice='$_POST[PI]'
    Quantity='$_POST[Q]'
    WHERE ProductCode='$_POST[PC]'");
  2. The problem is :
    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:xampphtdocstestinsertsearch.php on line 12
    This is my code
    search.php
    <?php
    $con=mysqli_connect("localhost",'root',"","projectt");
    // Check connection
    if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    $result = mysqli_query($con,"SELECT * FROM order
    WHERE orderCode= '$_POST[firstname]'");
    while($row = mysqli_fetch_array($result))
    {
    echo $row['orderCode'] . " " . $row['orderCode'];
    echo "<br>";
    }
    ?>
    this is trysearch.php
    <html>
    <body>
    <form action="search.php" method="post" enctype="multipart/form-data">
    Firstname: <input type="text" name="firstname">
    <input type="submit">
    </form>
    </body>
    </html>
    thx for help :)

     

×
×
  • Create New...