fork(2) download
  1. <?php
  2.  
  3. include("connect.php");
  4.  
  5. if (isset($_POST['usernam']))
  6. {
  7. $usernam = mysqli_real_escape_string($_POST['usernam']);
  8. if(ctype_alnum($usernam))
  9. {
  10. $check = mysqli_query("SELECT usernam FROM users WHERE usernam='$usernam'");
  11. if(mysqli_num_rows($check)==1)
  12. {
  13. $get = mysqli_fetch_assoc($check);
  14. $usernam = $get['usernam'];
  15. } else {
  16. echo"user does not exists";
  17. }
  18. }
  19. else
  20. {
  21. echo"username is not alphanumeric";
  22. }
  23. }
  24. else
  25. {
  26. echo "Please try again";
  27. }
  28.  
  29. $usernam = isset($usernam) ? $usernam : '-No Username-';
  30. ?>
  31.  
  32. <center><h2><?php echo $usernam;?></h2></center>
Success #stdin #stdout #stderr 0.01s 52488KB
stdin
Standard input is empty
stdout
Please try again
<center><h2>-No Username-</h2></center>
stderr
PHP Warning:  include(connect.php): failed to open stream: No such file or directory in /home/JlBIS9/prog.php on line 3
PHP Warning:  include(): Failed opening 'connect.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/JlBIS9/prog.php on line 3