Guest User

Untitled

a guest
Jan 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <?php
  2. $search=htmlspecialchars($_GET['load']);
  3. $method = isset( $_GET['btnAction'] ) ? $_GET['btnAction'] : '';
  4.  
  5. switch( $method ) {
  6. case 'Search':
  7. header('Location: search.php?load=$search');
  8. break;
  9. case 'Im Feeling Lucky':
  10. //do chapter two stuff
  11. header('Location: search_lucky.php?load=$search');
  12. break;
  13. default:
  14. echo 'Not a valid operation';
  15. }
  16.  
  17. ?>
  18.  
  19. <?php
  20. $search=htmlspecialchars($_GET['load']);
  21. if(isset($_GET['btnAction']) {
  22. $method = $_GET['btnAction'];
  23. }
  24.  
  25. switch( $method ) {
  26. case 'Search':
  27. header('Location: search.php?load=$search');
  28. break;
  29. case 'Im Feeling Lucky':
  30. //do chapter two stuff
  31. header('Location: search_lucky.php?load=$search');
  32. break;
  33. default:
  34. echo 'Not a valid operation';
  35. }
  36.  
  37. ?>
  38.  
  39. <?php
  40. $search=htmlspecialchars($_GET['load']);
  41. $method = isset( $_GET['btnAction'] ) ? $_GET['btnAction'] : '';
  42. switch( $method ) {
  43. case "search":
  44. header("Location: search.php?load=$search");
  45. break;
  46. case "Im Feeling Lucky":
  47. //do chapter two stuff
  48. header("Location: search_lucky.php?load=$search");
  49. break;
  50. default:
  51. echo 'Not a valid operation';
  52. }
  53. ?>
  54.  
  55. header("Location: search.php?load=$search");
  56.  
  57. header('Location: search.php?load='.$search);
Add Comment
Please, Sign In to add comment