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);
$name4 = date("Y-m-d");
$name5 = date("h:i:s A", time () );
$insert = $db->query("INSERT into p7 (name,name1,name2,name3,name4,name5) VALUES ('".$name."','".$name1."','".$name2."','".$name3."','".$name4."','".$name5."')");
if($insert){
$redirectUrl = 'contact.php';
echo '<script type="application/javascript">alert("Registered"); window.location.href = "'.$redirectUrl.'";</script>';
}else{
$statusMsg = "File upload failed, please try again.";
}
}
echo $statusMsg;
?>