Iam trying to INSERT data from submit page if the email ID doesnt exist already. The following code works perfectly fine with local Apache. However, in GAE cloud, INSERT statement doesnt get executed at all.
<?php
include("topmenu.php");
$student_name = trim($_POST['student_name']);
$email = trim($_POST['login_id']);
$password = $_POST['password'];
$course_name = 'Foundation Course in Website Development';
$hashed_password = password_hash($password, PASSWORD_DEFAULT);
include("cloudconnection.php");
$sql_check="SELECT * FROM User_info WHERE Email_ID='".$email."'";
$stmt1 = $db->prepare($sql_check);
$stmt1->execute();
$count = $stmt1->rowcount();
echo $count;
$sql="INSERT INTO `User_info` (Student_Name,Email_ID,Course_Name) VALUES ('".$student_name."','".$email."','".$course_name."') ";
echo $sql;
include("pdo.php");
header("Location: login.php?q=1");
?>