Hi all. I wonder how to print diffrent html based on passed value m in bold parts code below. For example if title is passed i print diffrent html and if album passed diffrent html. I want to print 3 diffrent html based in 3 diffrent values called title,album,artist. I be happy if an expert help me achive this .Thanks
Code:
[b]$m = $HTTP_GET_VARS['m'];[/b]
$s = $HTTP_GET_VARS['s'];
$user = "root";
$pw = "";
$db = "test2";
$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);
$query = "select id,artist,track,album,title from files where [B]$m[/B] like '%[B]$s[/B]%'order by track";
$result = mysql_query($query);
?>
<html>
<head>
...............
[b]diffrent html based on passed m value in this line[/b]
<?
while($row = mysql_fetch_assoc($result))
{
?>
[B]<tr>
<td bgcolor="#C0C0C0"><p align="center"><b><?=intval( $row['track'] );?></b></p>
</td>
<td bgcolor="#C0C0C0"><input
type="checkbox" name="Id" value='<?=intval( $row['id'] );?>' /></td>
<td bgcolor="#C0C0C0"><a
href="javascript:newWindow('./mp3s/myWimpy.php?queryWhere=Id&queryValue=<?=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> <?=strval( $row['title'] );?>
</td>
<td bgcolor="#C0C0C0"><?=strval( $row['album'] );?></td>
<td bgcolor="#C0C0C0"><?=strval( $row['artist'] );?>
</td>
<td align="center" bgcolor="#C0C0C0">0 </td>[/B]
<?
}
?>
.................
[b]diffrent html based on passed m value in this line[/b]
</body>