function RegistrarSuce($params) { $db = new ConSQL(); $db->connect(); $objFormato = new cFormato(); $objFormato->llenar($params); $db->beginTransacction(); $res = $objFormato->insertar($db); if ($res != null) { $db->commit(); $msj = array("codigo" => "OK", "texto" => "Exito"); } else { error_log("Entidad.WebServices ServicioEntidad->RegistrarSuce failed"); $db->rollback(); $msj = array("codigo" => "ERROR", "texto" => "No se pudo insertar: "); } return $msj; }
<input type="text" name="l_estado" id="textfield3" /></td> </tr> <tr> <td>Nro Expediente</td> <td>:</td> <td><label for="textfield4"></label> <input type="text" name="nu_expediente" id="textfield4" /></td> </tr> <tr> <td colspan="3"><input type="submit" name="button" id="button" value="Enviar" /></td> </tr> </table> </form> <?php $db = new ConSQL(); $db->Conectar(); $operando1 = '666'; $operando2 = 'prod6'; $operando3 = 'n'; $operando4 = '66-1'; //$nombre = $_POST['nombre']; $db->Consulta("INSERT INTO t_expediente(nu_suce,no_pruducto,l_estado_pago,nu_expediente) VALUES('{$operando1}','{$operando2}','{$operando3}','{$operando4}')");