x4rl
Well-known member
I have this php file which pulls from my datebase
And in the xenforo template is as follows
Is there a better way I can get this to work?
If I don't add the
It just opens the page in the Iframe which is 100% fail
Thanks for your time.
PHP:
<?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>
';
}
And in the xenforo template is as follows
HTML:
<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>
If I don't add the
PHP:
target="_blank"
Thanks for your time.