I am using WAMP as my server. created a database with 2 tables, one for customers & the other for customer viewpoints
once a customer has registered they can login and then leave viewpoints on subjects. these then go into the other table. the other table has the following columns viewpoint id (PK), customer id, subject, opinion, time.
The form for leaving viewpoints has two areas; topic & viewpoint.
so when a viewpoint is left this must obviously be stored in the viewpoints table
but the code to get the data from this form to this viewpoint table im am a bit unsure about. I know it will be similar to what i used for register as seen below. Some parts have been changed to match viewpoint table
I am not sure as 'time' needs to be inserted into database table aswell as customer id which i guess will be determined from once they are logged in.
//error_reporting(E_ALL ^ E_NOTICE);
// Get values from form
$subject = $_POST['subject'];
$comments = $_POST['comments'];
// Insert data into mysql
$sql="INSERT INTO viewpoint(,customer id ,subject , opinion, time)VALUES('$', '$s', '$', '$')";
// if successful insert data into database, displays message "completed".
echo "<a href=''>Back to page </a>";
// close connection
Please advise with this if possible, Thanks