Greaser9780 Posted February 17, 2007 Share Posted February 17, 2007 I have a php file that lists all of the registered clans and some of their stats in a ranked order. In the section of the table where I list the clan name , I wish for it to display the clan name as a link to a php file that will query all of that clans history,stats,logo etc. First off I have no clue how to display a link in php. I have tried numerous ways to do this in html but since it is in the middle of a while statement in php it won't let me. Second I am guessing the link would have to connect to a script such as stats.php that would query the db for the info for the clan name you clicked on and then display it in a series of tables. Anyone have any ideas on any parts of this? Link to comment https://forums.phpfreaks.com/topic/38906-solved-any-help-appreciated/ Share on other sites More sharing options...
emehrkay Posted February 17, 2007 Share Posted February 17, 2007 what you need to do is pull back the clan's id. when you go to display the clan's name do this echo "<a href=\"clan_info.php?id=". $row['id'] ."\">". $row['clan'] ."</a>"; or however you build your table cells. then on clan_info.php do a query using the id var from the link $id = $_GET['id']; $query = "SELECT fields FROM table WHERE id = ". $id; then display the info Link to comment https://forums.phpfreaks.com/topic/38906-solved-any-help-appreciated/#findComment-187141 Share on other sites More sharing options...
Greaser9780 Posted February 17, 2007 Author Share Posted February 17, 2007 Is that a "dynamic link"? Link to comment https://forums.phpfreaks.com/topic/38906-solved-any-help-appreciated/#findComment-187147 Share on other sites More sharing options...
emehrkay Posted February 17, 2007 Share Posted February 17, 2007 i would assume so Link to comment https://forums.phpfreaks.com/topic/38906-solved-any-help-appreciated/#findComment-187419 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.