Page 1 of 1
pb with passing variables
Posted: Wed Apr 13, 2005 4:32 am
by yannou
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
Posted: Wed Apr 13, 2005 5:10 am
by Chris Corbyn
What is showing in the HTML source code that is outputted?
Are you saying that the link points to itself?
Posted: Wed Apr 13, 2005 5:19 am
by yannou
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.

Posted: Wed Apr 13, 2005 5:44 am
by Chris Corbyn
<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

Posted: Wed Apr 13, 2005 6:01 am
by yannou
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.
Posted: Wed Apr 13, 2005 6:48 am
by John Cartwright
Moved to PHP-Code and please use
Posted: Wed Apr 13, 2005 6:50 am
by n00b Saibot
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

Posted: Wed Apr 13, 2005 6:53 am
by yannou
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
Posted: Wed Apr 13, 2005 7:00 am
by n00b Saibot
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 
Posted: Wed Apr 13, 2005 7:14 am
by yannou
ok, Thanks a million.

Posted: Wed Apr 13, 2005 7:21 am
by Chris Corbyn
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.
Posted: Wed Apr 13, 2005 7:55 am
by n00b Saibot
It sure is confusing seeing a new Mod having a Cart come outta nowhere LOL:lol: