prepare($sqlnoti); $querynoti-> bindParam(':notiuser', $sender, PDO::PARAM_STR); $querynoti-> bindParam(':notireciver',$reciver, PDO::PARAM_STR); $querynoti-> bindParam(':notitype', $notitype, PDO::PARAM_STR); $querynoti->execute(); $status='1'; $sql ="INSERT INTO openspace(name,email,gender, mobile,heurea,heured,status) VALUES(:name, :email, :gender, :mobileno,:heurea,:heured,'0')"; $query= $dbh -> prepare($sql); $query-> bindParam(':name', $name, PDO::PARAM_STR); $query-> bindParam(':email', $email, PDO::PARAM_STR); $query-> bindParam(':gender', $gender, PDO::PARAM_STR); $query-> bindParam(':mobileno', $mobileno, PDO::PARAM_STR); $query-> bindParam(':heurea', $heurea, PDO::PARAM_STR); $query-> bindParam(':heured', $heured, PDO::PARAM_STR); $query->execute(); $lastInsertId = $dbh->lastInsertId(); if($lastInsertId) { echo ""; echo ""; } else { $error="Something went wrong. Please try again"; } } ?>