GIF89a
<?php
date_default_timezone_set('Asia/Kolkata');
include 'db.php';
$statusMsg = '';
if(isset($_POST["submit"])){
$namez=$_POST['name'];
$name=str_replace("'","\'",$namez);
$name1z=$_POST['name1'];
$name1=str_replace("'","\'",$name1z);
$name2z=$_POST['name2'];
$name2=str_replace("'","\'",$name2z);
$name3z=$_POST['name3'];
$name3=str_replace("'","\'",$name3z);
$name4z=$_POST['name4'];
$name4=str_replace("'","\'",$name4z);
$name5z=$_POST['name5'];
$name5=str_replace("'","\'",$name5z);
$name6 = date("Y-m-d");
$name7 = date("h:i:s A", time () );
$insert = $db->query("INSERT into p13 (name,name1,name2,name3,name4,name5,name6,name7) VALUES ('".$name."','".$name1."','".$name2."','".$name3."','".$name4."','".$name5."','".$name6."','".$name7."')");
if($insert){
$redirectUrl = 'appointment.php';
echo '<script type="application/javascript">alert("Registered"); window.location.href = "'.$redirectUrl.'";</script>';
}else{
$statusMsg = "File upload failed, please try again.";
}
}
echo $statusMsg;
?>