mysql - PHP search form -
i new php please forgive if question or problem seem confusing trying create search form has 2 dropdown option: st. peter or jhs. user types in name of professor , choose school professor teach at. form has below <form name=form action="form.php" method="get"> <input type="text" name="find" /> <select name="school[]" > <option value="">school</option> <option value="1">st.peter</option> <option value="2">jhs</option> </select> <input type="submit" name="submit" value="search" /> </form> the form.php script using is <?php $q=$_get["find"]; $s=$_get["school"]; $con = mysql_connect('localhost', 'peter', 'abc123'); if($q && ($s==st.peter)) echo "that professor belongs st.peter h.s"; else{echo "that professor not belong school...