Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update
Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty
Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update Image not empty in php on time of update
<?php
if(isset($_POST['submit']))
{
$Brand=$_POST['Brand'];
$Generic=$_POST['Generic'];
$speciality1=$_POST['speciality'];
$gf=" ";
$fff="pcd range";
$speciality=$speciality1.$gf.$fff;
$form=$_POST['form'];
$Packing=$_POST['Packing'];
$PackingType=$_POST['PackingType'];
$MRP=$_POST['MRP'];
$featured=$_POST['featured'];
// return $text;
//echo $text;
$newarrival=$_POST['newarrival'];
$metaTitle2=$_POST['Title'];
$editor2=$_POST['editor2'];
$metaDescriptions2=$_POST['Descriptions'];
$text=$_POST['URL'];
$editor1=$_POST['editor1'];
// $banner=$_FILES['banner']['name'];
$image=$_FILES['image']['name'];
$image1=$_FILES['image']['tmp_name'];
move_uploaded_file($image1,"thumbnails/$image");
//move_uploaded_file($_FILES["banner"]["tmp_name"],"../images/$bannerpath");
$dash="-";
$ss="|";
$spi= " ";
$titletext="-PCD Franchise Company, ISO GMP certified pharmaceutical manfacturer";
// if(empty($metaDescriptions2)){
// $metaDescriptions=$Brand.$ss.$Generic.$spi.$form.$dash.$speciality.$titletext;
//} else{
$metaDescriptions= $_POST['Descriptions'];
//}
//if($metaTitle2!=''){
$metaTitle=$_POST['Title'];
//}else{
// $tii="Scothuman Lifesciences";
// $metaTitle= $text.$spi.$Brand.$ss.$tii;
//}
$updateph="UPDATE product SET name1='$Brand',name2='$Generic',slug='$text',brand='Scothuman Lifesciences',packing='$Packing',packingtype='$PackingType',mrp='$MRP',featured='$featured',newarrival='$newarrival',metatitle='$metaTitle',metadescriptions='$metaDescriptions',content_text='$editor1',faq_text='$editor2' ";
if(!empty($_FILES['image']['name']))
{
$updateph=$updateph.",`image`='$image'" ;
}
//$updateph= "WHERE idproduct='$id'";
$updateph=$updateph." WHERE idproduct='$id'";
$run=mysqli_query($conn,$updateph);
if($updateph){
echo '<div class="alert alert-success alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success!</strong> Product Updated.
</div>';
}
}
?>
Comments
Post a Comment