Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/imyrqtmy/public_html/agriba/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include'admin/dbc.php'; if(isset($_POST['enquiryform'])) { $name=$_POST['txtname']; $email=$_POST['txtemail']; $mobile=$_POST['txtmobile']; $city=$_POST['txtcity']; $msg=$_POST['txtmsg']; // Upload Prescription $prescription2 =trim($_FILES['txtprescription']['name']); $randd=rand(1000,9999); $prescription22= str_replace(' ', '-', strtolower($prescription2)); $prescription="USID".$randd.$prescription22; $temp=$_FILES['txtprescription']['tmp_name']; move_uploaded_file($temp, "media/prescription/$prescription"); date_default_timezone_set("Asia/Kolkata"); $enqdate=date("d-m-Y / h:i:s a"); $sql="insert into tbl_notify(name,email,mobile,city,productname,status,datee,prescription) VALUES ('$name','$email','$mobile','$city','$msg','1','$enqdate','$prescription')"; if(mysqli_query($conn,$sql) or die(mysqli_error($conn))) { echo "<script>location.href='enquiry-thank-you.php?&name=$name';</script>"; //echo "success"; } else { header('Location: index.php'); //echo "fail"; } } ?>