<?php
   include_once'db/connect_db.php';

   
   function funaccess($filename,$userid) 
                {
          
                         $formid=getformid($filename);
                          $select = $pdo->prepare("SELECT formid,userid FROM formaccess WHERE formid='$frmid' and userid='$userid'");
                          $select->execute();

                          if($select->rowCount() > 0 )
                                {  
                              
                              $bln=TRUE;
                          }  else {
                              $bln=FALSE;
                                   }
                        
                        return $bln;  
               
                 }
                 
   function getformid($fname) 
                {
                  $select = $pdo->prepare("SELECT id FROM form where name='$fname'");
                   $select->execute();
                    $row = $select->fetch(PDO::FETCH_ASSOC);
                 
                          if($select1->rowCount() > 0 )
                                {  
                         
                          $nm = $row['id'];
                                                        
                                }  else {
                          $nm="0";
                                   }
                }
               
                
                       function funaccess123($filename,$userid) 
                         {
                        $asd=FALSE;
                        return $asd;
                           
                        }
                      
                           
       

?>
   

