<?php
	session_start();
	include('dbcon.php');
	
if($_POST['wid'])
{
  $banner_id=$_POST['wid'];
  
$image = rand(1000,100000)."-".$_FILES['image1']['name'];
$res="select image from `welcome_note` where id='$banner_id'";
$rs=mysqli_query($con,$res);
$row=mysqli_fetch_assoc($rs);
$count=$row['image'];
//echo $image;
//exit();

move_uploaded_file($_FILES['image1']['tmp_name'],$count);  
  
$title1=$_POST['description2'];
  
  
  $query="update `welcome_note` set  description='$title1',image='$count' where id=$banner_id";
  $r=mysqli_query($con, $query);

    if($r>0)
{
   header("location:welcome-note.php?message=success1");
} 
} 





?>