?
Path : /home/enviro777/public_html/admin/ |
Current File : /home/enviro777/public_html/admin/insert3.php |
<?php ob_start(); include "include/connection.php"; $obj=new db(); if($_POST) { extract($_POST); //echo $kk; //exit; $imageName=$ptype."-".$_FILES['image']['name']; $source=$_FILES['image']['tmp_name']; move_uploaded_file($source, "product_images/".$imageName); $imagethum=$ptype."-".$_FILES['imagethum']['name']; $sourcethum=$_FILES['imagethum']['tmp_name']; move_uploaded_file($sourcethum, "produt_thum/".$imagethum); $sql="insert into product (`productId`,`model`,`proName`, `proDetails`, `proImage`, `proType`, `date`,`type`) values ('','$model', '$name', '$details', '$imageName','$ptype', now(),'$kk')"; // echo $sql; $obj->query($sql); header("location:addProduct.php?id=".$ptype."&st=success"); }