Jump to content

[SOLVED] Any help appreciated


Greaser9780

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.