GIF89a
<?php
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);
if(!empty($_FILES['file1']['name']))
{
$fileName1=$_FILES["file1"]["name"];
move_uploaded_file($_FILES["file1"]["tmp_name"],"Admin-Panel/image/Career/".$_FILES["file1"]["name"]);
}
$insert = $db->query("INSERT into p11 (name,name1,name2,name3,file1) VALUES ('".$name."','".$name1."','".$name2."','".$name3."','".$fileName1."')");
if($insert){
$redirectUrl = 'career.php';
echo '<script type="application/javascript">alert("Registered"); window.location.href = "'.$redirectUrl.'";</script>';
}else{
$statusMsg = "File upload failed, please try again.";
}
}
// Display status message
echo $statusMsg;
?>