Guest User

Untitled

a guest
Jan 6th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. $date = date("d.m.Y G:i");
  3. $servername = "localhost";
  4. $database = "*";
  5. $username = "*";
  6. $password = "*";
  7. $conn = mysqli_connect($servername, $username, $password, $database);
  8. mysqli_set_charset($conn, 'utf8');
  9. $sql = "insert into order_products( name, price, id_products, amount, image) select name, price, id_products, amount, image from order_products where id_order=1";
  10. mysqli_query($conn, $sql);
  11. $id = mysqli_insert_id($conn);
  12. mysqli_close($conn);
  13. header("Location: /");
  14. ?>
Add Comment
Please, Sign In to add comment