Advertisement
afterlife88

Untitled

Dec 24th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. if ($_POST['order_edit']){
  2.     $order = array();
  3.    
  4.     $order['customer'] = $_POST['customerId']; 
  5.     $order['product'] = $_POST['productId'];   
  6.  
  7.     add_order($order);
  8. }
  9.  
  10. function add_order($order){
  11.         $query = "INSERT INTO Orders (ID, ProductID, CustomerID) VALUES (NULL, '{$order['product']}', '{$order['customer']}');";
  12.         execute_query($query);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement