0

Hello I am new to php and I have a problem, I have a code below that shows the fields in my order_details table in my database, the problem is in the

                                         <tr>

                                            <td><?php echo $product_row['name']; ?></td>
                                            <td><?php echo $member_row['Firstname']." ".$member_row['Lastname']; ?></td>
                                            <td><?php echo $cart_row['price']; ?></td>
                                            <td><?php echo $cart_row['qty']; ?></td>
                                            <td><?php echo $cart_row['total']; ?></td>
                                            <td><?php echo $cart_row['status']; ?></td>
                                            <td><?php echo $cart_row['modeofpayment']; ?></td>

                                            <form action="update_sir.php" method="get">
                                            <td ><input type="text" name="sales_invoice_number">
                                         <input type="submit" value="Confirm"></td>
                                        </form>
                                               <td><?php echo $cart_row['date'];?></td>
                                            <td width="140"><a href="update_status.php<?php echo '?id='.$order_id; ?>" class="btn btn-success"><i class="fa fa-check"></i>&nbsp;Confirm Order</a></td>

                                        </tr>

The problem is in this:

 <form action="update_sir.php" method="get">
                                     <td ><input type="text" name="sales_invoice_number">   <input type="submit" value="Confirm"></td>
                                                </form>`

The Confirm Order button should only be clickable when the sales_invoice_number is updated first but the problem is that I cannot update it using the code above.
Here's my update_sir.php

<?php
include('connect.php');
$sir = $_GET["sales_invoice_number"];
mysql_query("update order_details set sales_invoice_number ='$sir' where orderid='$get_id'")or die(mysql_error());

                 header('location:orders.php');

?>

What seems to be the problem?

Edited by Theodore_2

2
Contributors
1
Reply
44
Views
3 Weeks
Discussion Span
Last Post by Mr.M
0

Your question and so is your problem not too clear. Please try first to expain what you want to achieve and then explain what is a problem because I personally don't get your question straight.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.