?
Path : /home/yogsadhna/public_html/admin/ |
Current File : /home/yogsadhna/public_html/admin/insert-author.php |
<? ob_start(); include "include/connection.php"; $obj=new db(); if($_POST) { extract($_POST); //$isbn=$_POST['isbn']; //$author=$_POST['author']; $imageName=$ptype."-".$_FILES['image']['name']; $source=$_FILES['image']['tmp_name']; move_uploaded_file($source, "gallery_images/".$imageName); $imagethum=$ptype."-".$_FILES['imagethum']['name']; $sourcethum=$_FILES['imagethum']['tmp_name']; move_uploaded_file($sourcethum, "gallery_thum/".$imagethum); $sql= "insert into authors (`sno`, `title`, `description`,`proImage`, `proThum`) values ('', '$name', '$isbn','$imageName', '$imagethum')"; //echo $sql; //exit; $obj->query($sql); header("location:authorlist.php?id=".$ptype."&st=success"); }