tony007
May 23rd, 2006, 10:29 AM
I am using the following query for searching for songname and i want make the entered search term bold not the whole song name. For example if search for song name that starts with love i want the the output look like this :
power of love
write now it display the whole song name without bolding the search term .Could any one show me how that can be then.Thanks
<b><?=strval( $row['songname'] );?></b> ===> display songname
$query = "select id,artist,album,songname from musictest where songname like '%$s%'";
<td><? echo $numbers; ?> </td>
<td><a href="javascript:newWindow('./playlistfromdbtotextfile.php?songid=<?=strval( $row['id'] );?>')"><img
src="./images/Speaker.gif" alt="Listen to this Song"
border="0" width="16" height="16"
longdesc="Listen to this Song"></a> <b><?=strval( $row['songname'] );?></b> </td>
<td><a
href=" ./albumsongs.php?albumname=<?=strval( $row['album'] );?>&artistname=<?=strval( $row['artist'] );?>"><?=strval( $row['album'] );?></a>
</td>
<td><a
href="albums.php?albumname=<?=strval( $row['artist'] );?>"><?=strval( $row['artist'] );?></a> </td>
</tr>
power of love
write now it display the whole song name without bolding the search term .Could any one show me how that can be then.Thanks
<b><?=strval( $row['songname'] );?></b> ===> display songname
$query = "select id,artist,album,songname from musictest where songname like '%$s%'";
<td><? echo $numbers; ?> </td>
<td><a href="javascript:newWindow('./playlistfromdbtotextfile.php?songid=<?=strval( $row['id'] );?>')"><img
src="./images/Speaker.gif" alt="Listen to this Song"
border="0" width="16" height="16"
longdesc="Listen to this Song"></a> <b><?=strval( $row['songname'] );?></b> </td>
<td><a
href=" ./albumsongs.php?albumname=<?=strval( $row['album'] );?>&artistname=<?=strval( $row['artist'] );?>"><?=strval( $row['album'] );?></a>
</td>
<td><a
href="albums.php?albumname=<?=strval( $row['artist'] );?>"><?=strval( $row['artist'] );?></a> </td>
</tr>