Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ www/ bjmea-1463dbf457e80c13-admin/ |
|
<?php require_once("config.php"); $config_obj = new database_config(); $config_obj->database_connect(); $Cat_Name = $_REQUEST['cat_name']; $Company_Name = $_REQUEST['company_name']; $Email = $_REQUEST['email']; $Title = $_REQUEST['title']; $des = $_REQUEST['des']; $Address = $_REQUEST['address']; $City = $_REQUEST['city']; $Country = $_REQUEST['country']; $Telephone = $_REQUEST['telephone']; $Fax = $_REQUEST['fax']; $Website = $_REQUEST['website']; $Contact_Person = $_REQUEST['contact_person']; $Add_Position = $_REQUEST['add_position']; $date = date('M d Y'); $files_temp=$_FILES['image']['tmp_name']; $image_name=$_FILES['image']['name']; $image_type=$_FILES['image']['type']; $image_size=$_FILES['image']['size']; $t=time(); $iname=$t.$image_name; $files_dir="upload/"; copy($files_temp, "$files_dir/$iname"); ////////////////////////////////////////////// $sql = "select * from add_list where cat_name='".$Cat_Name."' and company_name='".$Company_Name."'"; $ssql = mysql_query($sql); $check = mysql_num_rows($ssql); if($check >= 1) { $ErrorMessage = "This Company Name already exist In This Cetagories. Pleas Choss a Diferent Cetagories or Name"; header("Location: add_list.php?ErrorMessage=$ErrorMessage"); } else if(mysql_query("INSERT INTO add_list VALUES('','$iname','$Cat_Name', '$Company_Name', '$Title', '$Email', '$des', '$Address', '$City', '$Country', '$Telephone', '$Fax', '$Website', '$Contact_Person', '$date', '$Add_Position','1')")) { echo"Successfully Created!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=add_list.php>"; echo"</head>"; echo"</html> "; } else { echo "there is a problem."; } ?>