PHP MySQL - Display / then Link to another Display

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

Post Reply
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

PHP MySQL - Display / then Link to another Display

Post by tmaiden »

I have a page on my site that displays 2 columns, (tableonedate, tableonetitle), from a table, (tableone).

Here is a shorten version of the first table.
tableone (tableoneid, tableonedate, tableonetitle)


I want to make "tableonetitle" a link; when you click on it. It displays rows, (tabletwocolumnone, tabletwocolumntwo), from another table, (tabletwo).

Here is a shorten version of the second table.
tabletwo (tabletwoid, tableoneid, tabletwocolumnone, tabletwocolumntwo)


How do I pass "tableoneid" to another page and have the new page display "tabletwocolumnone" and "tabletwocolumntwo" where tableone.tableoneid = tabletwo.tableoneid?

Thanks.

*edit: typo
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the link in page 1: http://example.com/foo.php?tid=123

how to get it in page 2: $_GET['tid']
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

Post by tmaiden »

Is there another what to do it?

I don't want the user to be able to type in at the address bar.
http://example.com/foo.php?tid=123
http://example.com/foo.php?tid=124
http://example.com/foo.php?tid=125
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hidden form submission, but that requires Javascript, or the use of buttons..
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

Post by tmaiden »

How can I have when the user clicks the link. The id is saved into a session varaible, then when the new page opens, it uses that session variable for the WHERE cirtiera.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

normally, you can't without help from Javascript (at minimum)
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

Post by tmaiden »

Resolved. I decided to pass it though the URL. I created a 10 Character Random Generated String for the table ID. THANKS!
Post Reply