I am trying to post pictures in a joomla page. I am completely new in php and joomla.
This is what I have in a joomla page:
<h1>Welcome to my home page!</h1>
<p>Some text.</p>
<p>Some more text.</p>
<p><img src="images/test.php?id=8" alt="powered by" />
</p>
<p>Done!</p>
this is test.php:
<?php
$link=...... //connection to database
if(isset($_GET['id']))
{
$id = mysql_real_escape_string($_GET['id']);
$query=...
$result=mysqli_query($link,$query);
while($row=mysqli_fetch_array($result)) {
$imageData = $row['photo'];
}
header("content-type: image/png");
echo $imageData;
}
?>
This is just for a simple 1 photo print, I eventually want to print multiple photos, and have like a slideshow.
Is this possible using joomla?
I also tried several other ways, but I had no luck. Is it possible to have ?
I just need a way through loop through images that are in a database, and print them out. Is there a good approach to this than what I am taking? Do I have to install plugins?