Jump to content

PHP Image Click next page option?


danlew

Recommended Posts

I have the script working here now : nzsocietythai.org/nzsocietythailand.php

 

<?php

$q = mysql_query("SELECT * FROM news ORDER BY `date` DESC");

if (mysql_num_rows($q) > 0) {

  while ($rec = mysql_fetch_assoc($q)) {

    echo "<div class=\"news_entry\">\n";

    echo "<h1>$rec[title]</h1>\n";

    echo !empty($rec['image']) ? "<img src=\"images/$rec[image]\" />\n" : '';

    echo "<p>" . nl2br($rec['content']) . "</p>\n";

    echo "<p>Posted " . date('F j, Y', strtotime($rec['date'])) . "</p>\n";

    echo "</div>\n";

  }

}

?>

 

but i want to have it so when i click on the image it will go to page with info? what code do i need to set in different page and have link on it?

 

It will have say the image but larger, and the long description thats it. Nice and simple.....

 

The first page is just 1 image they click from this page "nzsocietythai.org/nzsocietythailand.php" than when it takes them to the secondary page it will show the same image but much bigger, with maybe an option to have 2 more images beside it and longer description....

Link to comment
https://forums.phpfreaks.com/topic/49944-php-image-click-next-page-option/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.