Guest User

Untitled

a guest
May 27th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2. $value1 = $_POST['txtValue1'];
  3. $value2 = md5($_POST['txtValue2']);
  4. try
  5. {
  6. require_once('connection.php');
  7. $sql = "UPDATE tableName SET column1='{$value1}' WHERE column2='{$value2}'";
  8. $resultado = $conn->query($sql);
  9. //echo var_dump($resultado);
  10. if($resultado == TRUE)
  11. {
  12. echo '<script> alert(")</script>';
  13. echo "<script> location.href=''</script>";
  14. }
  15. else
  16. {
  17. //echo "Error: El Correo y/o Contraseña son invalidos" . $conn->error;
  18. echo '<script> alert("")</script>';
  19. echo "<script> location.href=''</script>";
  20. }
  21. }
  22. catch(Excepcion $ex)
  23. {
  24. $error = $ex->getMessage();
  25. }
  26. ?>
Add Comment
Please, Sign In to add comment