Hi,
I'm using this script in order to get a set of results. But I would like to know to use the ? function in order top get results. i.e
http://www.selectguestlist.com/index/sunday.php?sort=id
or
http://www.selectguestlist.com/index....php?sort=name
I know this can be done with this type pf query:
SELECT * FROM `sunday` ORDER BY `name` ASC LIMIT 0, 30'
but how do you set it so I can start making url type query outputs?
<?
$link = mysql_connect('localhost',user', 'password')
or die("Could not connect");
mysql_select_db('select_db')
or die("Could not select database");
?>
<?
$query = 'SELECT * FROM `sunday` ORDER BY `name` ASC LIMIT 0, 30';
$page_result = mysql_query("select * from pageinfo where page like '$serial'");
$result=mysql_query($query)
or die(mysql_error());
?>
echo "<table>";
while ($row=mysql_fetch_object($result))
{
echo "<BODY bgColor=#155271 leftMargin=0 topMargin=0 rightMargin=0 bottomMargin=0 marginwidth=0 marginheight=0 onLoad=MM_preloadImages('guestlistOver.jpg','mapOv er.jpg','galleryOver.jpg')>";
echo "<TABLE cellSpacing=0 cellPadding=0 width=400 border=0>";
echo "<TBODY>";
echo "<TR>";
echo "<TD colSpan=2 height=6></TD></TR>";
echo "<TR>";
echo "<TD width=114 height=72><img height=73 src=clubs/$row->thumb width=109 border=0></TD>";
echo "<TD rowspan=5 vAlign=top> <TABLE width=100% height=134 border=0 cellPadding=0 cellSpacing=0>";
echo "<TBODY>";
echo "<TR>";
echo "<TD width=6><IMG height=8 src=home/bdr_leftcr.gif width=6 border=0></TD>";
echo "<TD width=100% background=home/bdr_top.gif height=6></TD>";
echo "<TD width=6><IMG height=8 src=home/bdr_rightcr.gif width=6 border=0></TD></TR>";
echo "<TR>";
echo "<TD width=6 height=128 background=home/bdr_rightside.gif>";
echo "<IMG height=128 src=home/bdr_leftside.gif width=6 border=0></TD>";
echo "<TD width=100% vAlign=top bgColor=#0F364A class=mainText>";
echo "<span class=mainTextBig>$row->name<br>$row->address</span>";
echo "<br>";
echo "<span class=mainText><br>$row->description<br>";
echo "<br><br>$row->info</span></TD>";
echo "<TD width=6 background=home/bdr_rightside.gif>";
echo "<IMG height=128 src=home/bdr_rightside.gif width=6 border=0></TD>";
echo "</TR>";
echo "</TBODY>";
echo "</TABLE>";
echo "<TABLE width=100% border=0 align=left cellPadding=0 cellSpacing=0>";
echo "<TBODY>";
echo "<TR>";
echo "<TD width=6><IMG height=20 src=home/bdr_leftcr_bt2.gif width=6 border=0></TD>";
echo "<TD height=20 background=home/bdr_bottom.gif> </TD>";
echo "<TD width=6><IMG height=20 src=home/bdr_rightcr_bt2.gif width=6 border=0></TD></TR>";
echo "</TBODY>";
echo "</TABLE></TD></TR>";
echo "<TR>";
echo "<TD height=20><img src=rate/$row->rate width=109 height=20></TD></TR>";
echo "<TR>";
echo "<TD height=20><a href=guestlist/sunday.htm target=_self onMouseOver=MM_swapImage('Guestlist1211','','guest listOver.jpg',1) onMouseOut=MM_swapImgRestore()><img src=guestlist.jpg alt=Guestlist name=Guestlist1211 width=109 height=20 border=0 id=Guestlist2></a></TD></TR>";
echo "<TR>";
echo "<TD height=20><a href=$row->map target=_blank onMouseOver=MM_swapImage('Map1211','','mapOver.jpg ',1) onMouseOut=MM_swapImgRestore()>";
echo "<img src=map.jpg alt=Map name=Map1211 width=109 height=20 border=0 id=Map2></a></TD></TR>";
echo "<TR>";
echo "<TD height=20><a href=$row->gallery onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('Gallery1211','','gallery Over.jpg',1)><img src=gallery.jpg alt=Gallery name=Gallery1211 width=109 height=20 border=0 id=Gallery2></a></TD></TR>";
echo "<TR>";
echo "<TD height=2></TD></TR>";
echo "</TBODY>";
}
echo "</TABLE>";
?>