So to summarize, create one database but multiple tables within for different types of data, e.g. one table for client info and another for inventory line items.
The one basic form I created allows a user to enter a client's first and last name, address, city, state, zip code, and I believe phone number. This is my code (the pertinent part):
// Get values from form
$lastname = $_POST['lastname'];
$firstname = $_POST['firstname'];
$address1 = $_POST['address1'];
$address2 = $_POST['address2'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
// Insert data into mysql
$sql="INSERT INTO $tbl_name(lastname, firstname, address1, address2, city, state, zipcode)VALUES('$lastname', '$firstname', '$address1', '$address2', '$city', '$state', '$zipcode')";
This writes successfully to the SQL table, but I wonder if A) this is the proper way to set it up and how one would go about searching the database and displaying that output to the user?
Thanks much, new to SQL and PHP so bear with me.