For some reason when i submit a form data to the database, that that seems to get stored is the random ID
Ive attached the PHP code below that im using... can you see any issues with the code that might be stoping both email addreses, name and message not being store in the database
// insert your data here with $rand as the id
$firstname = mysql_real_escape_string($_POST['youremail']);
$lastname = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['receiveremail']);
$datepicker = mysql_real_escape_string($_POST['message']);
In your query you are trying to insert the values for variables $youremail, $name, $receiveremail, $message - yet nowhere in your script do you have these variables declared and assigned values. What you do have are the variables $firstname, $lastname, $email, $datepicker (which don't make any sense in themselves as they don't relate to the posted data) and therefor it should be those variables that you use in your query.
The $rand number is being inserted as you declare it and assign a value early on in your script.
Bookmarks