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

  • Home
  • SEARCH
  • 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 9204051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:36:52+00:00 2026-06-17T23:36:52+00:00

I have a table below where it lists each image(s) for each question. <table

  • 0

I have a table below where it lists each image(s) for each question.

    <table id="tableqanda" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <th width="5%" class="questionno">Question No.</th>
            <th width="11%" class="image">Image</th>
        </tr>
        </thead>
        </table>
        <div id="tableqanda_onthefly_container">
        <table id="tableqanda_onthefly" cellpadding="0" cellspacing="0">
        <tbody>
            <?php
              foreach ($arrQuestionId as $key=>$question) {
            echo '<tr class="tableqandarow">'.PHP_EOL
echo '<td width="5%" class="questionno">'.htmlspecialchars($arrQuestionNo[$key]).'</td>' . PHP_EOL;
            echo '<td width="11%" class="imagetd">';
            if (empty($arrImageFile[$key])) {
                echo '&nbsp;';
            } else {
                echo '<ul class="qandaul"><li>';
                echo implode("</li>\n<li>", array_map(function($imgitem){
                return htmlspecialchars($imgitem);
            },  $arrImageFile[$key]));
                echo '</li></ul>';
            }
            echo '</td>';
            echo '</tr>'.PHP_EOL;
            }
    ?>
        </tbody>
        </table>
        </div>

Now at the moment it just lists the image file names in a bullet point list. But what I want to do is that I want to set each file as a hyperlink so that if the user clicks on an image link, it will display that image in a separate page (a separate window will open up) displaying the image itself

My question is how can this be done, what are the following steps I need to do? If somebody can show me how to code it step by step then I can use it for audios and videos as well.

Thanks

  • 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-06-17T23:36:53+00:00Added an answer on June 17, 2026 at 11:36 pm

    Okay, I’ve been thinking about what you want to do and I think you want to show a list of images as thumbnails or something, and then click an image and show it (within your layout) on a new page (previewimage.php).

    You have a lot of options… but they all boil down to passing some information through the URL (example.com/previewimage.php).

    First, let’s examine 2 typical ways to pass information through an URL

    $_GET Request

    Sometimes you’ll see a website pass add information to a URL, like

    example.com/previewimage.php?var=xxx
    

    This allows you to pass some information to your PHP script via the $_GET superglobal.

    Htaccess

    If you want to get kind of fancy, you can use htaccess to make a clean URL

    RewriteRule ^([a-zA-Z0-9]+)/$ previewimage.php?var=$1
    

    This will let you have an URL like example.com/xxx and the server will act like you went to example.com/previewimage.php?var=xxx.

    Now that you know how to hand information off to the url, we can look into some methods for using the $_GET[‘var’] to show the image.

    The easiest approach is to simply pass the name of the file… for this example let’s call it example.png.

    If you’re using the basic $_GET Request method above, you would have an URL like example.com/previewimage.php?var=example.png.

    Then, in previewimage.php, you simply do something like

    <img src="<?php echo $_GET['var'] ?>"/>
    

    This will output

    <img src="example.png"/>
    

    However, this is not a very safe method, as anyone can load anything they want. A better option might be using an array or a database, and then passing a key of some sort and retrieving the filename.

    I think this will set you on the right path (and I hope it answers your question).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<div id=member_sel_div style=> <table class=dataTable width=100% cellspacing=0 cellpadding=0 border=0 summary=> <tbody> <tr class=heding> <tr
I have a table, an example shown below, that lists people and their birth
I have a table which lists all events on a debating calendar. Each row
I have a results table which lists a set of values, each linking to
I have a SP with 20 select queries. Each query is table-name-aliased like below.
I have a Generic List object which hold below table as its own value.
i have the table below <tr id=group_1>...</tr> <tr id=el>...</tr> <tr id=el>...<tr> <tr id=group_2></tr> <tr
I have a table like below: Table A ---------- ID Field1 Field2 Field3 1
I have a table as below ID Date 1 Null 1 Null 1 Null
I have a table as below Name Priority Date ------------------------- A 2 d1 B

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.