Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Coding Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Meap" data-source="post: 324417" data-attributes="member: 1553"><p>When I have more than 4 images, the images go off the screen like this</p><p><img src="http://i.imgur.com/0zHTJ1F.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> How would I do it so after the first 4 images, it starts the new line of images instead of using my code to make a new page after every 4 images? My code is below</p><p>[PHP]<div id="box" class="big"></p><p></p><p> <div id="body"></p><p> <br></p><p> </p><p> <img src="http://i.imgur.com/E6KzqzT.gif" title="source: imgur.com" /></p><p> </p><p> <br></p><p> <br></p><p> </div></p><p> <table width="900" border="0" cellspacing="1" cellpadding="0"></p><p> </p><p><tbody></p><p> <tr></p><p><?php</p><p> $page = (empty($_GET['page'])) ? 1 : $_GET['page'];</p><p> $start_from = ($page-1) * 5;</p><p> </p><p> $getItems = dbquery("SELECT * FROM `values` ORDER BY rare_name DESC LIMIT $start_from, 5");</p><p> $image_dir = "http://198.50.211.213/images";</p><p> $evenOdd = '#ffffff';</p><p></p><p>while ($item = mysql_fetch_assoc($getItems))</p><p>{</p><p></p><p> if ($evenOdd == '#ffffff')</p><p> {</p><p> $evenOdd = '#f5f5f5';</p><p> }</p><p> else</p><p> {</p><p> $evenOdd = '#ffffff';</p><p> }</p><p> </p><p> echo('<td></p><p> <a class="hideDisplay"></p><p> <div class="bordequi" height:145px;"></p><p> <br></p><p> <br></p><p> <br></p><p> <center><img src="' . $image_dir . "/rare/" . clean($item['image']) . '.gif"></center></p><p> <br></p><p> <span class="showDisplayOnHover"></p><p> <b>' . clean($item['rare_name']) . '</b> <br></p><p> <span class="showBodyOfDisplayOnHover"></p><p> Price: <b>' . clean($item['price_credits']) . '</b> Credits<br></p><p> Status: <img src="' . $image_dir . "/" . clean($item['up_down']) . '.png"></p><p> </span></p><p> </span></p><p> </a></p><p> </td>');</p><p> </p><p> }</p><p> ?></p><p></tbody></p><p></table></p><p><center>Pages: <?php</p><p>$sql = "SELECT COUNT(image) FROM `values`";</p><p>$rs_result = dbquery($sql);</p><p>$row = mysql_fetch_row($rs_result); </p><p>$total_records = $row[0];</p><p>$total_pages = ceil($total_records / 4);</p><p> </p><p>for ($i=1; $i<=$total_pages; $i++) {</p><p> echo "<font size='2'><a href='values.php?page=".$i."'>".$i.", </a> </font>";</p><p>};</p><p>?></center></p><p></p><p> </body></p><p></html>[/PHP]</p></blockquote><p></p>
[QUOTE="Meap, post: 324417, member: 1553"] When I have more than 4 images, the images go off the screen like this [IMG]http://i.imgur.com/0zHTJ1F.png[/IMG] How would I do it so after the first 4 images, it starts the new line of images instead of using my code to make a new page after every 4 images? My code is below [PHP]<div id="box" class="big"> <div id="body"> <br> <img src="http://i.imgur.com/E6KzqzT.gif" title="source: imgur.com" /> <br> <br> </div> <table width="900" border="0" cellspacing="1" cellpadding="0"> <tbody> <tr> <?php $page = (empty($_GET['page'])) ? 1 : $_GET['page']; $start_from = ($page-1) * 5; $getItems = dbquery("SELECT * FROM `values` ORDER BY rare_name DESC LIMIT $start_from, 5"); $image_dir = "http://198.50.211.213/images"; $evenOdd = '#ffffff'; while ($item = mysql_fetch_assoc($getItems)) { if ($evenOdd == '#ffffff') { $evenOdd = '#f5f5f5'; } else { $evenOdd = '#ffffff'; } echo('<td> <a class="hideDisplay"> <div class="bordequi" height:145px;"> <br> <br> <br> <center><img src="' . $image_dir . "/rare/" . clean($item['image']) . '.gif"></center> <br> <span class="showDisplayOnHover"> <b>' . clean($item['rare_name']) . '</b> <br> <span class="showBodyOfDisplayOnHover"> Price: <b>' . clean($item['price_credits']) . '</b> Credits<br> Status: <img src="' . $image_dir . "/" . clean($item['up_down']) . '.png"> </span> </span> </a> </td>'); } ?> </tbody> </table> <center>Pages: <?php $sql = "SELECT COUNT(image) FROM `values`"; $rs_result = dbquery($sql); $row = mysql_fetch_row($rs_result); $total_records = $row[0]; $total_pages = ceil($total_records / 4); for ($i=1; $i<=$total_pages; $i++) { echo "<font size='2'><a href='values.php?page=".$i."'>".$i.", </a> </font>"; }; ?></center> </body> </html>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Coding Help
Top