Exploding Garrmondo Weiner Interactive Swiss Army Penis

Exploding Garrmondo Weiner Interactive Swiss Army Penis (http://www.gamingforce.org/forums/index.php)
-   Help Desk (http://www.gamingforce.org/forums/forumdisplay.php?f=36)
-   -   Need help with scripting language (http://www.gamingforce.org/forums/showthread.php?t=25965)

Winter Storm Oct 18, 2007 02:57 PM

Need help with scripting language
 
I dont know which of three sections were appropriate to place this in.

I have an avatar gallery that is now getting too big and I want to break it up into pages.

I dont wont to use tables(HTML), and I used PHP but thats just..well tables. Basically I want a format like this: DayDream Graphics: Web Design & Programming Community

but without download/member tabs.

What language I need to use to pull that off?

this is my PHP code

Code:

<?php
$a = '0';
$filepath = "images/avatars/80";
$dir = dir($filepath);


echo "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"35%\">";
while($entry=$dir->read()) {
    if($entry == "." || $entry == "..") {
        continue;
    }
    $fp = @fopen("$filepath/$entry","r");

if ($a == '0') {echo "<tr>";}
if ($a == '09') {echo "<tr>";}
if ($a == '18') {echo "<tr>";}
if ($a == '27') {echo "<tr>";}
if ($a == '36') {echo "<tr>";}
if ($a == '45') {echo "<tr>";}
if ($a == '54') {echo "<tr>";}
?><td>
  <img src="<? echo "$filepath/$entry" ?>" alt="<? echo $entry ?>"></a>
  </td>
<?
$a = $a + 1;
}

?>

I do have a MySQL database..

Grawl Oct 18, 2007 03:04 PM

I don´t know jack about PHP, but wouldn´t it be easier to write a while-loop for creating those <tr>-tags?

Code:

while ( $counter <= 60 ) {
echt "<tr>";
$counter + 9;
}

Or sumting.

Winter Storm Oct 18, 2007 04:15 PM

That locked up the page..or maybe I placed it in wrong. I need to relearn all my stuff(HTML/CSS/PHP/MySQL) all over again.

I'm in hell.

LiquidAcid Oct 18, 2007 05:19 PM

Is your only question about PHP being able to handle such a task? Then the answer is yes, PHP is server-side scripting and should be able to generate ANY documents for the client.

Or what kind of answers do you seek? When you want to code everything yourself, then good luck!

Winter Storm Oct 18, 2007 10:35 PM

It's all good. I can use PHP to "talk to" MySQL and create an avatar database..so that I can upload my avatars, and when a certain amount of rows per page is reached, it'll go into a new page. Instead of people looking at one big ass page of avatars.

I just wanted to know what I had to learn and apparently it's how to use MySQL.


All times are GMT -5. The time now is 05:10 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.