Sorry for this question.
Basically I have a page where I have it automatically sorting through categories etc and each block (img and 1 or 2 details) has a link (which takes to a Static Profile page). I also have a database created that with another page that is used to populate it.
Now I could create a page (html or php) for each but this is not what I want as I do not want 100 pages of the same thing/layout just different data and images.
I want to use the same layout on e.g. single.php - but populate it differently depending on which link the user clicked.
I seem to understand the logic I just dont understand how to do it. It's obviously pulling the data from each database entry depending on the one clicked.
Very sorry to annoy you all as I am sure it is easy but I just can't get my head around it.
Thanks for any help you can provide.
Example.
index.php <- which I have working fine. User can get to the desired link using filters (name, category, etc)
single.php <- I want this to be the 1 php page that is populated with different data depending on which link the user clicked. So no.1 is clicked and single.php displays the data for profile1, no.2 is clicked and single.php displays the data for profile2 etc.
The data I am referring to will be static text with 1 or 2 a href links (standard) and also some images.
I know it is meant to be something like this single.php?=somethinghere but I am not sure.
If anyone can help I would be very appreciative.
***EDITED BELOW***
So would I do the following then? As I am trying to pull the data from the database to populate the single.php page.
`if($_GET['link']=='companyname1'){
//print company1 details on single.php page
echo '<div>info on companyname1 from database</div>';
echo '<otherdiv>other info on companyname1 from database</div>';
}elseif($_GET['link']=='companyname2'){
//print company2 details on single.php page
echo '<div>info on companyname2 from database</div>';
echo '<otherdiv>other info on companyname1 from database</div>';
}else{
//print main index
}`