/ Published in: PHP
This is for a particular search on a project. Just saving here for future use.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{doctype} <head> {embed="site/_global_head_title"} {css} </head> <body class="home"> <div id="container"> <div id="content"> <div id="content-main"> <form name="frm_jobsearch" method="get" action=""> <table border="0" cellspacing="0" cellpadding="4"> <tr> <td class="arialsm">Specialty</td> <td> <select name="specialty" class="arialsm"> <option value="Any">Any</option> <option value="Emergency Medicine">Emergency Medicine</option> </select></td> </tr> <tr> <td class="arialsm">Profession</td> <td> <select name="profession" class="arialsm"> <option value="Any">Any</option> <option value="Doctor of Osteopathy">Doctor of Osteopathy</option> <option value="Medical Doctor">Medical Doctor</option> <option value="Nurse Practitioner">Nurse Practitioner</option> <option value="Physician Assistant">Physician's Assistant</option> </select></td> </tr> <tr> <td class="arialsm">State</td> <td> <select name="state" class="arialsm"> <option value="Any">Any</option> <option value="Alabama">Alabama</option> <option value="Arkansas">Arkansas</option> <option value="Florida">Florida</option> <option value="Georgia">Georgia</option> <option value="Illinois">Illinois</option> <option value="Louisiana">Louisiana</option> <option value="Michigan">Michigan</option> <option value="Ohio">Ohio</option> <option value="Tennessee">Tennessee</option> <option value="Virginia">Virginia</option> <option value="Washington">Washington</option> </select></td> </tr> <tr> <td> </td> <td><input type="submit" value="Search" class="arialsm" /></td> </tr> <tr><td colspan="2"> </td></tr> <tr> <td> </td> <td><a href="/jobs?specialty=&profession=&state=">View all jobs</a></td> </tr> </table> </form> <?php if($_GET['specialty'] == "Any") { $specialty = 'Emergency Medicine'; } else { $specialty = $_GET['specialty']; } if($_GET['profession'] == "Any") { $profession = 'Medical Doctor|Doctor of Osteopathy|Nurse Practitioner'; } else { $profession = $_GET['profession']; } if($_GET['state'] == "Any") { $state = 'Florida|Alabama|Michigan'; } else { $state = $_GET['state']; } ?> {exp:weblog:entries weblog="jobs" limit="25" rdf="off" dynamic="off" disable="categories|member_data|pagination|trackbacks" search:specialty="<?= $specialty ?>" search:profession="<?= $profession?>" search:state="<?= $state?>"} <div class="item"> <ol> <li>{title}</li> <li>{description}</li> <li>{specialty}</li> <li>{profession}</li> <li>{state}</li> </ol> <div> {/exp:weblog:entries} </div> <!-- close #content-main --> </div> <!-- close #content --> </div> <!-- close #container --> </body> </html>
URL: http://ngenworks.clientsection.com/projects/452958/posts/18856379/comments