I've looked at some of the other similar questions, but still can't seem to get it working. FWIW, I am not getting any specific error message.
<?php
// Create connection
$con=mysqli_connect("localhost","username","password");
mysqli_select_db($con, "database");
//let's start our session, so we have access to stored data
session_start();
$class = mysqli_real_escape_string($_SESSION['exclass']);
$fullname = mysqli_real_escape_string($_SESSION['fullname']);
$june = mysqli_real_escape_string($_SESSION['June']);
$july = mysqli_real_escape_string($_SESSION['July']);
$email = mysqli_real_escape_string($_POST['email']);
$phone = mysqli_real_escape_string($_POST['phone']);
//let's create the query
$insert_query = "INSERT INTO Responses (class,fullname,June,July,email,phone) VALUES ('$class','$fullname',$june,$july,'$email','$phone',)";
//let's run the query
$result = mysqli_query($con,$insert_query);
if($result){
echo "Your response has been recorded. Thank you!";
}else{
printf("Insert failed: %s\n", mysqli_error());
}
?>
'$phone'which breaks the query. Not sure why you aren't seeing the error message though - that should report a syntax error.$june,$julyin single quotes?