PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
yannou
Forum Newbie
Posts: 5 Joined: Wed Apr 13, 2005 4:27 am
Post
by yannou » Wed Apr 13, 2005 4:32 am
Hi all,
this should be a vry simple one for you experts!!!
I am using PHP/MySLQ on my site.
I have created a list poulated by a table:
Code: Select all
<a href="xxxxxxx=<?php echo $row_Recordset1['Gas_ID']; ?>" >
<?php echo $row_Recordset1['Gas_Name']; ?></a>
How can the link I created for each recorset open up in the same location on the same page?
I hope I am making myself clear...
Thanks a million.
Jcart | Please use
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Wed Apr 13, 2005 5:10 am
What is showing in the HTML source code that is outputted?
Are you saying that the link points to itself?
yannou
Forum Newbie
Posts: 5 Joined: Wed Apr 13, 2005 4:27 am
Post
by yannou » Wed Apr 13, 2005 5:19 am
No, I mean that the link has to point to the same page... Arf, I know it's even hard to explain .
Imagine you have a table populated by a database.
Imagine I want to link each line of that table to some data but you want it to appear in the exact same page and same location when the visitor clicks on it.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Wed Apr 13, 2005 5:44 am
<a href="?row=<?php echo $$row_Recordset1['Gas_ID']; ?>">
Where $_GET['row'] is the ID of that row
Then you just change you query for the DB based on the value of $_GET['row']...
BTW.... the PHP Code forum is the best place to ask this type of question
yannou
Forum Newbie
Posts: 5 Joined: Wed Apr 13, 2005 4:27 am
Post
by yannou » Wed Apr 13, 2005 6:01 am
Thx d11wtq,
But I still don't understand how to display the result instead of the table rows now... I'll go ask in the forum.
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Wed Apr 13, 2005 6:50 am
yannou wrote: How can the link I created for each recorset open up in the same location on the same page?
What do you mean - in same location
do you want to display it inline... or do you want to display it in same window. Boy, are you confusing
yannou
Forum Newbie
Posts: 5 Joined: Wed Apr 13, 2005 4:27 am
Post
by yannou » Wed Apr 13, 2005 6:53 am
ok ok ok I know, not only am I a newbie but I am also french, so it's sometimes tough to get an idea through.
I'll try php code forum
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Wed Apr 13, 2005 7:00 am
yannou wrote: ok ok ok I know, not only am I a newbie but I am also french, so it's sometimes tough to get an idea through.
I'll try php code forum
Hey don't get excited. Calm down...
This thread has been moved to PHP-Forum. So you can ask it right here...
PS: Hey Phenom, is that you by the name JCart
yannou
Forum Newbie
Posts: 5 Joined: Wed Apr 13, 2005 4:27 am
Post
by yannou » Wed Apr 13, 2005 7:14 am
ok, Thanks a million.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Wed Apr 13, 2005 7:21 am
n00b Saibot wrote: PS: Hey Phenom, is that you by the name JCart
It is indeed.... I asked him that not long back
- just to confuse everyone... a random new member with >1000 posts appered out fo the blue with phenom's avatar LOL.
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Wed Apr 13, 2005 7:55 am
It sure is confusing seeing a new Mod having a Cart come outta nowhere LOL:lol: