I've been reading treads and I haven't found anything along the lines that I'm trying.
I have a database of hockey players, I can build a query via html form to search by first and last name or a combination but I want to be able to narrow down the search. Say by position, so along with the first and last name I made checkboxes for the various positions.
When I pass to the query the first 3 kinda work but I can't get the last 2 to go at all.
<table width="60%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td align='right'><strong><font face="Arial, Helvetica, sans-serif">Centre:</font></strong></td>
<td><input name="checkBox[0]" type="Hidden" id="C" value="">
<input name="checkBox[0]" type="checkbox" id="C" value="C">
</td>
<td align='right'><strong><font face="Arial, Helvetica, sans-serif">Left Wing:</font></strong></td>
<td><input name="checkBox[1]" type="Hidden" id="LW" value="">
<input name="checkBox[1]" type="checkbox" id="LW" value="LW">
</td>
<td align='right'><strong><font face="Arial, Helvetica, sans-serif">Right Wing:</font></strong></td>
<td><input name="checkBox[2]" type="Hidden" id="RW" value="">
<input name="checkBox[2]" type="checkbox" id="RW" value="RW">
</td>
<td align='right'><strong><font face="Arial, Helvetica, sans-serif">Defense:</font></strong></td>
<td><input name="checkBox[3]" type="Hidden" id="D" value="">
<input name="checkBox[3]" type="checkbox" id="D" value="D">
</td>
<td align='right'><strong><font face="Arial, Helvetica, sans-serif">Goalie:</font></strong></td>
<td><input name="checkBox[4]" type="Hidden" id="G" value="">
<input name="checkBox[4]" type="checkbox" id="G" value="G">
</td>
</tr>
</table>
I used the hidden box method, I don't know any other. All of these seem to be exactly the same but when I send the info to my php script again I say the first three work, C, LW and RW but the D and G just won't go.
This is my query...
I add the query works find from command line.
$query = "SELECT * FROM Players_Year_6 WHERE First like '${first_name}%' and Last like '${last_name}%' and (PO = '$checkBox[0]' or PO = '$checkBox[1]' or PO = '$checkBox[2]' or PO = 'checkBox[3]' or PO = 'checkBox[4]')";
Any info would be great.
Corey