Advertisement
corovino

Untitled

Oct 28th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.31 KB | None | 0 0
  1.         //echo json_encode($fila1);
  2.                     if($con = conexion::mu()){
  3.                       if($con->query("insert into tbl_alojamiento (nombre, id_tipo_alojamiento, telefono) values ('$fila[2]',$fila[1],$fila[7])")){
  4.                         $id_aloja = $con-> insert_id; /*Me genera id  de alojamiento tbl vdv*/
  5.                         if($con->query("insert into tbl_usuario (nombre,telefono) values ('$fila[4]',$fila[6])")){
  6.                           $id_usuario = $con -> insert_id; /*Me genera id  de usuario  tbl vdv y en tbl_cliente aloja */
  7.                           if($con->query("insert into tbl_correo (id_usuario,correo) values ($id_usuario,'$fila[8]')")){
  8.                              
  9.                    if($con2->query("update tbl_cliente_aloja set id_usuario=$id_usuario, id_alojamiento=$id_aloja where id=$id"))
  10.                                       $destinatario="r_sastoque@hotmail.com";
  11.                                       $asunto="probando envio de email";
  12.                                       $mensaje = '
  13.                                            <html>
  14.                                            <head>
  15.                                               <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16.                                               <title>Bienvenido a VDV</title>
  17.                                            </head>
  18.                                            <body>
  19.                                               <p><a>Este es un mensaje de prueba Click aqui</a></p>
  20.                                            </body>
  21.                                            </html>
  22.                                            ';      
  23.  
  24.                            
  25.                                     $enviado = mail($destinatario,$asunto,$mensaje );
  26.                                     // echo json_encode(mail($destinatario,$asunto,$mensaje));
  27.                                  if($enviado){
  28.                                    echo json_encode('se envio');
  29.                                  }else{echo json_encode(' No se envio!');}  
  30.                                        
  31.  
  32.                            
  33.  
  34.                                $con->close();
  35.                                $con2->close();
  36.                           }
  37.                         }
  38.                       }
  39.                        
  40.                     }
  41.                     /*$lista=implode(',',$_POST[$fila]);
  42.                     $count = count($fila);
  43.                      for ($i=0; $i < co
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement