title: Entering new/editing existing DB records with info from multiple tables
body: <p>So, I have a database for a mock phone site that has been built to the spec. My database has a table called phones, a table called operatingsystem and a table called manufacturer. I need to create a form to enter a new phone into the database. The problems I have run into are:</p>
  
  <p>I need to basically get the form to add a new record to the <strong>phones</strong> table. However, the <strong>phones</strong> table pulls data from other tables as well. An example of this is how I have the operating systems (iOS, Android, BlackBerry and Windows Phone) stored separately in the <strong>operatingsystem</strong> table and each have an ID assigned (1, 2, 3 and 4) as well as having the manufacturers being stored in a <strong>manufacturer</strong> table (HTC, Samsung, Apple etc.) each with an auto increment ID. I'm not sure how I'd design the form so that the user can either add a new phone to the database simply by using the form or can add a new manufacturer/OS to the database if needed. I've got to do it assuming that the user adding the phones/editing existing ones hasn't got access to the database so obviously they don't know that manufacturer ID 1 is Apple, 2 Samsung etc.</p>
  
  <p>I basically need to use a combination of a HTML form and accompanying PHP page so that phones can be added, edited or deleted altogether from the database. What would I do in terms of form design and what PHP would I need to use to be able to add/edit/delete data from multiple tables?</p>
  
  <p>Sorry for the long-winded post but any help would be appreciated and if any more details are needed, please do not hesitate to ask. Thank you.</p>