Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Patulong po sa Php mga sir update field sa table

abujuguluy

Recruit
Basic Member
Messages
1
Reaction score
0
Points
16
Magandang umaga po, patulong sana sa code ko hindi ko kasi mapagana gusto ko sanang mag update sa isang field na naka table
Code:
  <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> Confirm Order</a></td>
									
 
                                        </tr>
ang kelangan ko po kasi dapat bago maging clickable ung Confirm Order e ma update muna ung Sales_Invoice_Number ng order ang problema di ko ma update ung Sales_invoice_number

eto ung update_sir.php ko mga sir
Code:
<?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');

?>
 
Last edited:
Try mo pre <input type="text" name="sales_invoice_number" id="sales_invoice_number">
 
Saan galing ang $get_id? panu mo sya na declare dko makita ang value nya.

baka dyan ang mali mo. kasi my where clause ka tapos saan galing ang $get_id?

mysql_query("update order_details set sales_invoice_number ='$sir' where orderid='$get_id'")or die(mysql_error());
 
Try a ladderize validation.

1) echo $sir;
2)
a. if may value then proceed in checking sa query.
b. if walang value then check bago mag submit.

For the given code, ito lng pde kong isagot sayo since kulang yung details.
 
Back
Top Bottom