Hi, I am gonna try and explain this as clear and as best I can relating to what I want to do. I run an internet radio station (Legal) I use SAM Broadcaster. It has (2) search functions a search box where you type in text to search for an artist and the other uses character search letters A-Z. What I want to do is this. The first option (search box) if you type in a single letter....A, B, C etc the search returns everything based on the letter you type into the search box, but the character letters return a search of ONLY the letter you type in, if you click the letter A it returns ONLY artists that begin with A type in B and it returns ONLY artists that start with B , etc. Below is the code for the search box option:
<div id="search">
<form method="get" action="playlist.php" name="searchParameters">
<!--Search: <?php InputText('search', $search, '',20); ?>-->
<!--<input type="submit" value="Go" name="B1"/>-->
<!-- Display <?php InputCombo('limit', $limit, 25, '5,10,25,50,100', "", "document.forms.searchParameters.submit();"); ?> results-->
What I want to do is either convert the above code to work like the character button search:
<table>
<tbody>
<tr>
<td>
<input type="submit" name="character" class="characterButton" value="All" onclick="document.forms.searchParameters.search.value=''"/>
</td>
<td>
<input <?php echo "0 - 9" == $character? "id='activeCharacter'" : "";?> type="submit" name="character" class="characerButton"value='0 - 9'/>
</td>
<?php
for($charVal = ord('A');$charVal <= ord('Z'); $charVal++) {
$c = chr($charVal);
echo "<td>";
echo "<input ".($character == $c? "id='activeCharacter'" : "")." type='submit' name='character' class='characterButton' value='$c' onclick='document.forms.searchParameters.search.value=\"\"' />";
echo "</td>";
}
?>
</tr>
</tbody>
</table>
I would like to have it where in search box, if you type in A it returns ONLY artists that start with A and if you type in B it returns ONLY aretist that start with B. Or simply edit the search character letters code (2nd code I listed) to work as a search box. Hope I explained it clear lol and sorry if I did not input the codes correctly, I am not really sure about code tags on suppor forums. Thanks in advance