I am trying to create a search form for my database where a user can search for a customer name and all of that customers addresses will be displayed. my structure looks like this
Customer table
ID First Name Last name Company NameAddress Table
ID line 1 post code town Customer_IDSite Table
ID Address_ID notesI take either the first, last, or company name as an input($field) and store this as a variable along with which column they want to search in($query) then I use the following query to check the database for matching criteria
$data


No comments:
Post a Comment