Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7445971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:11:03+00:00 2026-05-29T12:11:03+00:00

We have several pages generated using PHP on our website with the following titles

  • 0

We have several pages generated using PHP on our website with the following titles (for example):

http://www.mysite.com/project/category/1
http://www.mysite.com/project/category/2
http://www.mysite.com/project/category/3

Each one is created dynamically with the same page layout with each showing a different database result depending on the predefined conditions.

I would like an image to be displayed at the top of the page for just one of the results, let’s say for http://www.mysite.com/project/category/2 – how can I go about this?

The relevant code on our page is this:

$category=mysql_fetch_array(mysql_query("select * from project_category where project_category_id='".$project_category_id."'"));?>

If we go down the if statement route can you show an example of how to display an example image by modifying the above code to get me started?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:11:06+00:00Added an answer on May 29, 2026 at 12:11 pm

    In the end I opted for an if statement (as found here http://www.tizag.com/phpT/if.php).

    The original code above was modified in the following way:

    $category=mysql_fetch_array(mysql_query("select * from project_category where project_category_id='".$project_category_id."'"));
    
     if ( $project_category_id == "2" ) {
        echo '<a href="http://www.mywebsite.com/imagelink" target="_self"><img src="http://www.mywebsite.com/image.jpg" width="675" height="75" border="0" /></a>';
    }?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several pages to do with several table on each page. I've got
My wordpress is not setting the front page correctly, I have several pages, all
I have several wpf pages with update/delete/add buttons. I want to display to the
I have several aspx pages that can be opened either normally (full screen in
I have several web pages on several different sites that I want to mirror
We have a Flex application which has several 'pages' worth of content. Each time
I'm new to WordPress. I have my site (CMS) divided to several pages in
I have a MasterPage, several content pages - each of the content pages have
We have several web services that we have been deploying manually using msdeploy .
I have several projects, some using managed code and some using only unmanaged. All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.