Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. if(isset($_POST['prof_match']) && ($_POST['prof_match']) != 'NULL') {
  2. $choice_prof = "= " . ($_POST['prof_match']); // Example P01 is Accountant
  3. }else {
  4. $choice_prof = 'IN(SELECT prof FROM profiles)';
  5. }
  6.  
  7. // The query is as follows:
  8.  
  9. SELECT * FROM profiles WHERE age $choice_age AND height $choice_ht AND edn $choice_edn AND prof $choice_prof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement