<?php
session_start();
include "../../inc/config.php";
session_check();
switch ($_GET["act"]) {
  case "in":
  
  
  
  $data = array("formadepago"=>$_POST["formadepago"],);
  
  
  
   
    $in = $db->insert("formadepago",$data);
    
    if ($in=true) {
      echo "good";
    } else {
      return false;
    }
    break;
  case "delete":
    
    
    
    $db->delete("formadepago","idformadepago",$_GET["id"]);
    break;
  case "up":
   $data = array("formadepago"=>$_POST["formadepago"],);
   
   
   

    
    $up = $db->update("formadepago",$data,"idformadepago",$_POST["id"]);
    if ($up=true) {
      echo "good";
    } else {
      return false; 
    }
    break;
  default:
    # code...
    break;
}

?>