Question: trying to get sql data When two tables are related how to implement foreign key and insert data. This is what I tried. ?php include_once
trying to get sql data When two tables are related how to implement foreign key and insert data. This is what I tried. 
?php include_once 'dbh.inc.php'; $first = $_POST['firstname' ); $last = $_POST[ 'lastname']; $phone = $_POST['phone']; $email = $_POST['email']; $address = $_POST[ 'address']; $user = $ POST['username'; $password = $_POST['pw']; $sql = "INSERT INTO person (fname, 1name, phone_no, email, address) VALUES ('$first', '$last', '$phone', '$email', 'Saddress');"; mysqli_query($conn, $sql); $sq12 = "INSERT INTO customer (user name, password) VALUES ('$user', '$password');"; mysqli_query($conn, $sq12)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
