Guest User

Untitled

a guest
Jul 3rd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. <FORM method="post">
  2.  
  3. <P>Pais:</P>
  4. <INPUT type="text" name="pa">
  5. <BR>
  6. <BR>
  7. <P>Estado:</P>
  8. <INPUT type="text" name="est">
  9. <BR>
  10. <BR>
  11. <P>Ciudad:</P>
  12. <INPUT type="text" name="ciud">
  13. <BR>
  14. <BR>
  15. <P>Calle: </P>
  16. <INPUT type="text" name="call">
  17. <BR>
  18. <BR>
  19. <P>Telefono:</P>
  20. <INPUT type="text" name="tel">
  21. <BR>
  22. <BR>
  23. <BR>
  24. <INPUT type="Submit" name="boton" value="Registrar">
  25. <BR>
  26. </FORM>
  27.  
  28. <?PHP
  29. include "conexion.php";
  30. session_start();
  31. $pais=$_REQUEST['pa'];
  32. $estado=$_REQUEST['est'];
  33. $ciudad=$_REQUEST['ciud'];
  34. $calle=$_REQUEST['call'];
  35. $telefono=$_REQUEST['tel'];
  36.  
  37. mysqli_query($conexion,"UPDATE usuarios set
  38. ".$pais",".$estado",".$ciudad",".$calle",".$telefono" where User=$_SESSION[usuario]")
  39. or die("Problemas en el Update: ".mysqli_error($conexion));
  40.  
  41. mysqli_close($conexion);
  42.  
  43. $registros = mysqli_query($conexion, "select * from usuarios where Email = '$_REQUEST[mail]'")
  44. or die("Problemas en el select: ".mysql_error($conexion));
  45.  
  46. if ($reg = mysqli_fetch_array($registros))
  47. {
  48.  
  49. $verificar = mysqli_query($conexion, "select * from usuarios where Email = '$_REQUEST[mail]' and password = '$_REQUEST[pass]'")
  50. or die("Problemas en el select: ".mysql_error($conexion));
  51.  
  52. if($ver = mysqli_fetch_array($verificar)){
  53. @session_start();
  54. $_SESSION["Auntentificado"] = "SIP";
  55. $_SESSION["usuario"] = $ver["User"];
  56. header ("Location: FramesInicioUnion.php");
  57. }
  58. else
  59. {
  60. header ("Location: InicioFallido.php");
  61. }
  62. }
  63. else
  64. {
  65. echo "<CENTER><h1>No se ah encontrado un usuario registrado en nuestra base de datos o alguno de los datos ingresados es incorrecto.</h1></CENTER>";
  66. header ("Location: InicioFallido.php");
  67. }
  68. mysqli_close($conexion);
Add Comment
Please, Sign In to add comment