'Nother Question
Moderator: General Moderators
- SilverMist
- Forum Commoner
- Posts: 65
- Joined: Tue Mar 02, 2004 2:06 pm
- Location: Canada
- Contact:
'Nother Question
Okie, here's my problemo. I can make a page like page.php?pid=1 but here is what I need: page.php?pid=1&name=Page&cat=3 because I am making a lyric website, so I'm going to make it so when someone clicks on "Keith, Toby" and his CD Shock N' Y'All, then song Whiskey Girl, the page has to be k.php?name=keithtoby&cd=shocknyall&song=whiskeygirl. Okay? Please help 
Re: 'Nother Question
Ok. What's the question?SilverMist wrote:Okay?
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
You just create the links to do so:
Can all be done one a single page that just looks to see if there is an artist/album/song in the url, and if there is show the correect listing.
Code: Select all
<a href="page.php?artist=keith-toby">Keith, Toby</a>
<a href="page.php?artist=keith-toby&album=Shock-n-yall">Shock N All</a>
<a href="page.php?artist=keith-toby&album=Shock-n-yall&song=whiskeygirl">Whiskeygirl</a>- SilverMist
- Forum Commoner
- Posts: 65
- Joined: Tue Mar 02, 2004 2:06 pm
- Location: Canada
- Contact:
Yes BUT, I need the code so that I can place all the page content. Like I need the code so that when they click Shock N' Y'all, I need to put a list of all the songs on that disk, then, when selected, can proceed to the song page. If you need more info, just ask, I'm not that good at explaining things. 
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Code: Select all
if(isset($_GET['artist'])){
//show albums
}else if(isset($_GET['album'])){
//show songs
}else if(isset($_GET['song'])){
//show lyrics
}else{
//show artists
}Code: Select all
id
type #will be either artist/album/song
value
parent- SilverMist
- Forum Commoner
- Posts: 65
- Joined: Tue Mar 02, 2004 2:06 pm
- Location: Canada
- Contact:
Heh, thank you!! But there is still a problem
Here is my code:
So, when I go to the page, I get the whole "Hello there. This is me, testing a page!" thing, which is wonderful
But here's the problem. When I go page.php?artists I get "Hello there. This is me, testing a page!I guess this is the artist's page!" which, as you can prolly tell, is not what I want 
Code: Select all
<?php
{
echo "Hello there. This is me, testing a page!";
}
if(isset($_GET['artist'])){
//show albums
echo "I guess this is the artists page!!";
}else if(isset($_GET['album'])){
//show songs
echo "Weeee 'nother page!";
}else if(isset($_GET['song'])){
//show lyrics
echo "Wee yet another page!";
}else{
//show artists
}
?>-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Code: Select all
<?php
if(isset($_GET['artist'])){
//show albums
echo "I guess this is the artists page!!";
}else if(isset($_GET['album'])){
//show songs
echo "Weeee 'nother page!";
}else if(isset($_GET['song'])){
//show lyrics
echo "Wee yet another page!";
}else{
echo "Hello there. This is me, testing a page!";
}
?>- SilverMist
- Forum Commoner
- Posts: 65
- Joined: Tue Mar 02, 2004 2:06 pm
- Location: Canada
- Contact:
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm