Ok so I have 3 tables
1.phone: id name manufacturerid osid
2.manufacturer manufacturerid manufacturername
3.os osid osname
How can i put the data from one of the tables (manufacturerid1 -> manufacturerid2 and osid1>osid2) to the the first one everytime i want to upload the first table...
I'm not even sure im asking the right question, all i want is to make a table for a manufacturer so when i display the manufacturer names, i click on one of the names and every phone that belongs to that manufacturer/os shows up.
Also how can i update the data through php (my full phone table is much longer with data that i dont need to have more tables to use)
This the script i used before realising i need tables for manufacuter(brand) and os(OperatingSystem) so that when i display them by one of them, more manufacturers of the same name wont pop up.
<?php
include 'connect.php';
mysql_select_db("phone", $connect);
$id = $_POST['ID'];
$name = $_POST['name'];
$stock = $_POST['stock'];
$brand = $_POST['brand'];
$operatingsystem = $_POST['operatingsystem'];
$camera = $_POST['camera'];
$handset = $_POST['handset'];
$screen = $_POST['screen'];
$connectivity = $_POST['connectivity'];
$batterylife = $_POST['batterylife'];
$memory = $_POST['memory'];
$messaging = $_POST['messaging'];
$soundformat = $_POST['soundformat'];
$price = $_POST['price'];
$flag= $_POST['flag'];
$sql = "UPDATE phone SET name='$name', stock='$stock', brand='$brand', operatingsystem='$operatingsystem', camera='$camera', handset='$handset', screen='$screen', connectivity='$connectivity', batterylife='$batterylife', memory='$memory', messaging='$messaging', soundformat='$soundformat', price='$price', flag='$flag' WHERE ID='$id' ";
if (!mysql_query($sql,$connect))
{
die('Error: ' . mysql_error());
}
echo "<h1>1 record was just updated in the database.</h1>";
mysql_close($con);
?>