Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("db_move.php"); ?>
- <?php
- if(isset($_POST['name'])){
- foreach($_POST['name'] as $name) {
- $person = array('name' => $name,'region' => $_POST[region],'course' => $_POST[course_name],'product' => $_POST[product]);
- $sql = "INSERT INTO staff (name, region, course_name, product) VALUES (" . $person[name] . ", " . $person[region] . ", " . $person[course] . ", " . $person[product] . ")";
- if ($conn->query($sql) === TRUE) {
- echo "course added successfully";
- };
- // debug:
- // print_r($person);
- };
- };
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement