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 5954067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:55:03+00:00 2026-05-22T17:55:03+00:00

I have this php file which pulls from my datebase <?php $cdb = new

  • 0

I have this php file which pulls from my datebase

<?php
$cdb = new PDO('mysql:dbname=xxx;host=localhost', 'xxx', 'xxx');

foreach ($cdb->query("SELECT * FROM images ORDER BY posted DESC LIMIT 3") AS $img)

    {
    $twofirst = substr($img['hash'], 0, 2);
        echo '
                    <a style="position: relative; display: block; height: 140px;" href="/booru/post/view/' . $img['id'] . '" target="_blank">

                        <img src="booru/timthumb.php?src=images/' . $twofirst . '/' . $img['hash'] . '&h=125&w=125&q=100" width="125px" style="border-style: none"/>
                    </a>
                    ';

    }

Template

  <div class="section">
    <div class="secondaryContent">
            <h3>New Cosplays</h3>
              <iframe marginwidth="0" marginheight="0" width="125px" height="400px" scrolling="no" frameborder=0 src="image.php">
              </iframe>
  </div>
</div>

Is there a better way I can get this to work?
If I don’t add the target="_blank" It just opens the page in the Iframe which is not what I want

Someone say to use AJAX but I have no idea of how to even start if someone could maybe show me an example that would be great.

Thanks for your time.

  • 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-22T17:55:03+00:00Added an answer on May 22, 2026 at 5:55 pm

    Use target=”_top” instead of “_blank”.

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

Sidebar

Related Questions

I have this file 'gardens.php' , which pulls data from a table called 'generalinfo'
I have this code which will include template.php file from inside each of these
I have a php file which pulls some data from external API's, and I
I have a php file which has a require_once Statement (?) this file is
I have this PHP script which i'm grabbing images from a directory and displaying
I have this drupal slideshow which pulls images from a folder sequentially by image
This is driving me crazy. I have this one php file on a test
I have the following code: if (include_once(dirname(__FILE__).'/file.php') || include_once(dirname(__FILE__).'/local/file.php') ) { This causes an
I have a file as documentRoot/app/webroot/myFile.php I need to be able to access this
I have this php code, with which I am trying to generate a popup

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.