<?php
	include_once('config.php');   
    if(!isset($_SESSION['custId'])) 
    {
         header("Location: ".ROOTPATH."/");
         die;
    }  

         if(isset($_POST['submitLogin']))
         {  
				$stmt=$conn->prepare("update   pw__newage  set name=:name,address=:address,ph=:ph where  id=:id ");   
				$stmt->bindValue(':id', $_REQUEST['AgId'] , PDO::PARAM_STR); 
                $stmt->bindValue(':name', $_POST['agency'] , PDO::PARAM_STR); 
                $stmt->bindValue(':address', $_POST['address'] , PDO::PARAM_STR); 
                $stmt->bindValue(':ph', $_POST['phone'] , PDO::PARAM_STR);   
                $stmt->execute();        
				$_SESSION['adAdd'] =1;
                header("Location: Mywokexp.php");
                die;
         }
		 
		  
         
        $stmt=$conn->prepare("select  *  from  pw__newage where  id=:id ");   
        $stmt->bindValue(':id', $_REQUEST['AgId'] , PDO::PARAM_STR); 
        $stmt->execute();   
        $AgencyId = $stmt->fetch(PDO::FETCH_OBJ); 
		
		 


include_once("view/editaddAgency.php");
?>