I hope this isn't a repeat question. I have searched all over to find an answer to no avail.
I want to insert into a row of a table. It sounds simple enough, but if the table is empty, it will not work. I can't figure out why. As long as there is one row in the table, it works fine. Any help is appreciated. Thanks.
<?php $fname = $_POST['fname']; $mi = $_POST['mi']; $lname = $_POST['lname']; $phone = $_POST['phone']; $email = $_POST['email']; $add1 = $_POST['add1']; $add2 = $_POST['add2']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $con = mysqli_connect("localhost","database_username","database_password","database"); $sql1 = "INSERT INTO employee (fname, mi, lname, phone, email, add1, add2, city, state, zip) VALUES ('$fname', '$mi', '$lname', '$phone', '$email', '$add1', '$add2', '$city', '$state', '$zip')"; mysqli_query($con,$sql1); mysqli_close($con); ?>