APPLY FOR ONLINE Zend Framework Certification

                    
                        Step 1 Call list of Data as Explained in previous Tutorials Then create an function
           to retrieve id to delete
public function deleteAction()
{
    	$auth = Zend_Auth::getInstance();
    	if(!$auth->hasIdentity())
    	{
    		$this->_redirect("/index/loginform");
    	}
    	$param= array("host"=>"localhost","username"=>"root","password"=>"","dbname"=>"zend");
    	$db= new Zend_Db_Adapter_Pdo_Mysql($param);
    	$request=$this->getRequest();
    	$this->view->assign('title',$request);
    	$sql="delete from employee where id='".$request->getParam('id')."'";
    	$db->query($sql);
    	$this->_redirect('/index/list');
}
                    
                


Comment


Back to Top