xflip
03-24-2004, 04:24 AM
can anyone please teach me how to do this kind of thing?
http://squareinsider.com/news/archive.php
As you can see, theres a dropdown... and when you choose one in the drop down, it shows the articles that matches the category...
Im trying to do the same but with not news articles but fanarts...
I only have this so far..
(this is fanart.php)
$sql = mysql_query('SELECT DISTINCT artist FROM site_fanartsindex');
for ($x = 0; $x < mysql_num_rows($sql); $ex++)
{
$row3 = mysql_fetch_array($sql);
$artist = $row['artist'];
$showartist .= "<option value=fanartartist.php?artist={$artist}>$artist</option>";
echo "
<select class="form" onchange="window.open(this.options[this.selectedIndex].value,'_self')" size="1" name="page">
<option value="#">ARTIST</option>
<option value="#">-----------------------------</option>
$showartist
</select>
then in fanartist.php
$sql = mysql_query("SELECT * FROM site_fanartsindex WHERE artist=$artist");
ECHO "STUFF HERE, got this part done, this is the easy one ^^ "
basically, can anyone provide more "lectures", fixes and stuff. I have never tested the code and I DOUBT it will work.
thanks!
http://squareinsider.com/news/archive.php
As you can see, theres a dropdown... and when you choose one in the drop down, it shows the articles that matches the category...
Im trying to do the same but with not news articles but fanarts...
I only have this so far..
(this is fanart.php)
$sql = mysql_query('SELECT DISTINCT artist FROM site_fanartsindex');
for ($x = 0; $x < mysql_num_rows($sql); $ex++)
{
$row3 = mysql_fetch_array($sql);
$artist = $row['artist'];
$showartist .= "<option value=fanartartist.php?artist={$artist}>$artist</option>";
echo "
<select class="form" onchange="window.open(this.options[this.selectedIndex].value,'_self')" size="1" name="page">
<option value="#">ARTIST</option>
<option value="#">-----------------------------</option>
$showartist
</select>
then in fanartist.php
$sql = mysql_query("SELECT * FROM site_fanartsindex WHERE artist=$artist");
ECHO "STUFF HERE, got this part done, this is the easy one ^^ "
basically, can anyone provide more "lectures", fixes and stuff. I have never tested the code and I DOUBT it will work.
thanks!