$result = mysql_query("SELECT name FROM cat_categories WHERE ref = 1 ORDER BY name ASC")
or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo '<a href="list.php?name=' . urlencode($row['name']) . '">'
. htmlspecialchars($row['name']) . "</a><br />\n";
}
ok
this bit of code resides on a page called index_2.php
now when you click a link it goes to list.php
where in that php file i need to figure out which ad to show according to what link is clicked
atcually live operation : okauchee.fearfx.com/index_2.php
now when you go to that page theres 3 links
each link came from the above php code.
then you go to list.php to find out which link was clicked and show that corresponding ad
so for instance $_GET['name'] = Agency
now the WORD Agency came from the TABLE cat_categories and column 'name'
there is also a column called 'id' in TABLE cat_categories
I want to retrieve the 'id' from TABLE cat_categories
WHERE $_GET['name'] = info from column 'name'
follow?