You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
801 B

  1. <?php
  2. /*
  3. Author:XM
  4. Compeny:Spiders Travel
  5. */
  6. require_once '../Common/Mysql.php';
  7. $pdo=conn();
  8. $order_id = isset($_POST["order_id"]) ? $_POST["order_id"] : false;
  9. $per_price = isset($_POST["per_price"]) ? $_POST["per_price"] : false;
  10. $order_ticket_num = isset($_POST["ticket_num"]) ? $_POST["ticket_num"] : false;
  11. if( $order_id == false || $per_price == false || $order_ticket_num == false ) {
  12. echo "change price failed";
  13. exit();
  14. }
  15. $all_price = $per_price * $order_ticket_num;
  16. $pdo_update = conn();
  17. $sql_update = " UPDATE order_main SET ORDER_PRICE={$per_price} WHERE PARENT_ORDER_ID={$order_id} ";
  18. $pdo_update->exec($sql_update);
  19. $sql_update = " UPDATE order_main SET ORDER_PRICE={$all_price} WHERE ORDER_ID={$order_id} ";
  20. $pdo_update->exec($sql_update);
  21. echo "change price success";
  22. exit();