Is there any way to loop a session variable with an array value to insert into the database?
$list_application
which where I store the array value
You will see in my code that I've directly insert the $list_application and it returns an Array
when I printed it out.
if(isset($_POST['submit'])) {
include('includes/dbconn.php');
$list_application = $_SESSION['LIST_APPS'];
$currUser= getenv("username");
$get_data = "INSERT INTO technologyresults(examdate, technology, prof, eid) VALUES(CURDATE(),'$list_application', '$list_application','$currUser')";
if($conn->query($get_data) === TRUE ) {
include('includes/dbconn.php');
} else {
echo "Error: " . $get_data. "<br>" . $conn->error;
}
$conn->close();
header('location: summary.php');
}