GIF89a php
Current File : /home/drbalajibabycent/public_html/Admin-Panel/employee-service.php
<?php


   include_once('db.php');
	

	session_start();
	if(isset($_POST['submit']))
	{
		
		$id=$_POST['id'];
			
    $namez=$_POST['name'];  
    $name=str_replace("'","\'",$namez);
    
    $name1z=$_POST['name1'];  
    $name1=str_replace("'","\'",$name1z);
    
    	if(!empty($_FILES['file1']['name']))
				{
					$fileName1=$_FILES["file1"]["name"];
					move_uploaded_file($_FILES["file1"]["tmp_name"],"image/Services/".$_FILES["file1"]["name"]);
				}
				else
				{
					$fileName1 = $_POST["file2"];
				}
		
    
    
    
				$insert = $db->query("update p6 set name='$name',name1='$name1',file1='$fileName1' where id='$id'");
				
				
				
             if($insert){
               

               header("location:Service-view.php");exit;

            }else{
                echo  "File upload failed, please try again.";
            } 

               	header("location:Service-view.php");exit;
			
		
	}
?>