Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are automatic anchored links possible 1

Status
Not open for further replies.

dmacster

Technical User
Jan 28, 2005
670
US
I'm very new to the PHP and mySQL arena. I've been asked to help set up an ad showcase.

Background on project - a button on a newspaper site will take the user to a page that has categories with featured advertisers that must be created on the fly - I'm thinking of active and non-active fields in the DB.

So if there are 30 advertisers in a weeks, the two that may be Landscapers will appear under a link to the category/page Landscapers. The question is pretty much can the Landscapers page (this is the third level in) be created to have anchored links to the jpgs of the ads based on ad numbers.

The client has a sample of what will appear from the button at

They've manually set up the style they want. Can the third level/category pages be created with automatic anchored links to go directly to the image of the ad?

Hope that makes sense. They decided yesterday to move faster than originally planned for this.

Thanks,
Donna
 
sure. but this is really a browser function.

all you need do is provide an id in the link that is clicked. such as

Code:
<a href="myDynamicPage.php#IDofAd">Landscape Artists</a>

and then in your code that creates the page with the images

Code:
foreach ($adImages as $adImage){
  echo <<<HTML
    <div>
        <a name="{$IDofAd}">
        <img src="adImage.jpg">";
    </div>
HTML;
}
 
Thank you. That's a great help.

Donna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top