Page 1 of 1

PHP MySQL - Display / then Link to another Display

Posted: Mon Mar 06, 2006 10:38 am
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

Posted: Mon Mar 06, 2006 11:21 am
by feyd
the link in page 1: http://example.com/foo.php?tid=123

how to get it in page 2: $_GET['tid']

Posted: Mon Mar 06, 2006 11:32 am
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

Posted: Mon Mar 06, 2006 11:43 am
by feyd
hidden form submission, but that requires Javascript, or the use of buttons..

Posted: Mon Mar 06, 2006 11:50 am
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.

Posted: Mon Mar 06, 2006 11:53 am
by feyd
normally, you can't without help from Javascript (at minimum)

Posted: Mon Mar 06, 2006 11:56 am
by tmaiden
Resolved. I decided to pass it though the URL. I created a 10 Character Random Generated String for the table ID. THANKS!