Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/09/2014, 13:06
Coscullo
 
Fecha de Ingreso: junio-2013
Mensajes: 20
Antigüedad: 10 años, 10 meses
Puntos: 0
Respuesta: insertar datos con PHP orientado a objetos

añado esto.. cuando envio las variables del formulario las tomo en este archivo y luego lo envio al que ya e hecho referencia

Código PHP:
Ver original
  1. <?php
  2.  /* registro del beneficiario */
  3.  include('beneficiary_class_process.php');
  4.  if(!empty($_POST["nombre"]) and !empty($_POST["apellido"])and
  5.     !empty($_POST["cedula"]) and !empty($_POST["telefono"])and    
  6.     !empty($_POST["tipo"]) and !empty($_POST["calle"])and    
  7.     !empty($_POST["carrera"]) and !empty($_POST["municipio"])and    
  8.     !empty($_POST["parroquia"]) and !empty($_POST["telfcasa"])and    
  9.     !empty($_POST["direccion"]) and !empty($_POST["parroquiados"])and    
  10.     !empty($_POST["municipiodos"]) and !empty($_POST["telfinca"]))
  11.    
  12.     {
  13.    
  14.  $insert= new beneficiario              ($_POST["nombre"],$_POST["apellido"],
  15.                             $_POST["cedula"],$_POST["telefono"],   
  16.                             $_POST["tipo"] ,$_POST["calle"],    
  17.                             $_POST["carrera"],$_POST["municipio"],    
  18.                             $_POST["parroquia"],$_POST["telfcasa"],    
  19.                             $_POST["direccion"],$_POST["parroquiados"],    
  20.                             $_POST["municipiodos"],$_POST["telfinca"]);
  21.  
  22. $insert->guardar_beneficiario();
  23. }
  24. ?>