Hi,
I have a problem.
What I am trying to acheive is get the information from one database and insert it, with more data into another. I have looked into joining tables but from what I gather this isn't going to help me much. (But maybe I can stand corrected)
I have a database full of cars for sale. Up til now I have mixed private persons and dealers all in together, and I know for dealers with more than one vehĂcule (ie most) I am repeating information but as this db is never going to be excessivly large I have decided to live with it.
Now what I want to do is to allow the dealer to put in vehicles without having to repeat the same information (eg name, telephone etc) every time so I am creating a db with this information.
All is going well but I have this problem;
The dealer has logged in and I have pulled out his/her relevant information. Now he can insert a car via a form.
This code is in alongside the form.
//all the usual stuff
$data = mysql_fetch_array($result); // get results into $data
$name = $data[name] ;
$town = $data[town] ;
$telephone = $data[telephone] ;
Now - how do I pass this data onto my next page alongside the details of the vehicle filled in on the form?
Ie - when the user clicks "submit", these variables AND the form variables are passed through.
There must be a very simple way. Sessions maybe? I am not too sure how to use sessions.
Any suggestions?