kohjhjhصثقصثقصثقgdfgdg
Ele57885fddfgdfgfghgقفغفغفقhfg555434536
/
home
/
u402332945
/
domains
/
simmar.co.in
/
public_html
/
Admin-Panel
/
Upload FileeE
HOME
<?php // Include the database configuration file include 'db.php'; $statusMsg = ''; if(isset($_POST["submit"])){ // Allow certain file formats $namez=$_POST['name']; $name=str_replace("'","\'",$namez); $name1z=$_POST['name1']; $name1=str_replace("'","\'",$name1z); //$name2z=$_POST['name2']; //$name2=str_replace("'","\'",$name2z); //$name3=$_POST['name3']; //$name4=$_POST['name4']; $fileName1=$_FILES["file1"]["name"]; move_uploaded_file($_FILES["file1"]["tmp_name"],"image/product/".$_FILES["file1"]["name"]); // Insert image file name into database $insert = $db->query("INSERT into p14(name,name1,file1) VALUES ('".$name."','".$name1."','".$fileName1."')"); // } if($insert){ header("Location:Sub_Category.php"); // echo "<script type=\"text/javascript\">". //"alert('success');". // "</script>"; // header(locatio) //$redirectUrl = 'http://localhost/admin/.php'; //echo '<script type="application/javascript">alert("Registered"); window.location.href = "'.$redirectUrl.'";</script>'; }else{ $statusMsg = "File upload failed, please try again."; } } //}else{ // $statusMsg = 'Please select a file to upload.'; //} // Display status message echo $statusMsg; ?>