The scenario was like I had a customer apllication form for plots. Mostly getting the customer data and it has a droopdown field showing the available plots from the plots table where plots.clients_id='NULL' and status='Null'.
Now after the customer has selected a plot i want to store the client_id from the session variable into the plots.client_id (a foreign key from clients table) where plots.plot_id=selected plot id from the form.
The query i am trying to run does not store the value of the client id into the plots table. The query is as follows:
//echo $plot_id; //the value is printed
$query="INSERT INTO plots(client_id) VALUES ($client_id) where plots.plot_id='$plot_id'";