Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php include("db_move.php"); ?>
  2. <?php
  3. if(isset($_POST['name'])){
  4. foreach($_POST['name'] as $name) {
  5. $person = array('name' => $name,'region' => $_POST[region],'course' => $_POST[course_name],'product' => $_POST[product]);
  6. $sql = "INSERT INTO staff (name, region, course_name, product) VALUES (" . $person[name] . ", " . $person[region] . ", " . $person[course] . ", " . $person[product] . ")";
  7. if ($conn->query($sql) === TRUE) {
  8. echo "course added successfully";
  9. };
  10.  
  11. // debug:
  12. // print_r($person);
  13. };
  14. };
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement