fork download
  1. <?php
  2.  
  3. include "app/php/require.ini.php";
  4.  
  5. if (isset($_GET['email']) && preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $_GET['email'])) {
  6. $email = $_GET['email'];
  7. }
  8. if (isset($_GET['key']) && (strlen($_GET['key']) == 32)) {
  9. $key = $_GET['key'];
  10. }
  11.  
  12. if (isset($email) && isset($key)) {
  13. $active_defaul = 0;
  14.  
  15. $stmt = $con->prepare("SELECT * FROM users WHERE email=? AND email_code=? AND active=?");
  16. $stmt->bind_param("ssi",$email,$key,$active_defaul);
  17. $stmt->execute();
  18. $stmt->store_result();
  19. if ($stmt->num_rows>0) {
  20. echo "¡La cuenta ya se ha activado o la URL no es válida!";
  21. } else {
  22. echo "¡Tu cuenta ha sido activada!";
  23. $active = 1;
  24. $stmtA = $con->prepare("UPDATE users SET active=? WHERE email=?");
  25. $stmtA->bind_param("is",$active,$email);
  26. $stmtA->execute();
  27.  
  28. }
  29.  
  30. } else {
  31. echo "Redirrecionar a otro sitio";
  32. }
Success #stdin #stdout #stderr 0.01s 82560KB
stdin
Standard input is empty
stdout
Redirrecionar a otro sitio
stderr
PHP Warning:  include(app/php/require.ini.php): failed to open stream: No such file or directory in /home/xfTHOr/prog.php on line 4
PHP Warning:  include(): Failed opening 'app/php/require.ini.php' for inclusion (include_path='.:/usr/share/php') in /home/xfTHOr/prog.php on line 4