decrypt_string($_SESSION['ESession']); $RSEditorJournal = NULL; $QSEditorJournal = NULL; $QSEditorJournal = mysqli_query($conn,"SELECT * FROM editorial WHERE Email='$Email'"); $RSEditorJournal = mysqli_fetch_array($QSEditorJournal); $JournalCode = NULL; $JournalCode = $RSEditorJournal['JournalCode']; // Picture Upload $name=$_FILES["image"]["name"]; if ($name == NULL || $name == "") { header("location:step4.php?cd=1&msg=Please select file to upload your photograph.");exit; } $check = explode(".", $name); $a=$check['1']; $path1=$JournalCode."_".$RSEditorJournal['ID']; $newname = $path1.".".$a; $tmp_name = NULL; @unlink($tmp_name, "EditorPicture/$newname"); move_uploaded_file($tmp_name, "EditorPicture/$newname"); $cv=$_FILES["cv"]["name"]; // CV Upload $tmp_name1 = $_FILES["cv"]["tmp_name"]; if ($tmp_name1 == NULL || $tmp_name1 == "") { header("location:step4.php?cd=1&msg=Please select file to upload your CV.");exit; } $check1 = explode(".", $cv); $a1=$check1['1']; $path2=$JournalCode."_".$RSEditorJournal['ID']; $newname1 = $path2."."."$a1"; @unlink($tmp_name1, "EditorCV/$newname"); move_uploaded_file($tmp_name1, "EditorCV/$newname1"); mysqli_query($conn,"UPDATE editorial SET PicturePath='".$newname."', CV='".$newname1."' WHERE Email='$Email'"); mysqli_close($conn); header("location:thankyou.php"); ?>