HTML question?

<?PHP
if ($users[Epicgamer] == "fart") {
	echo "The PHP Tags are for posting PHP CODE!!!!!";
}
?>

Well. I was going to say you could use recordsets, and XML to change the data being displayed in tables, since i assume that is what he is using (tables). As an example, lets say you’re doing a Monsters Page.

You could set it up like this:


|Monsters|
|Monster 1| Rabite |
|Monster 2| Mushboom |
|Monster 3| Eye Spy |
|
__________________________________________|

   [first] [previous] [next] [last]

When one of the buttons was clicked, it would move the corresponding way along the recordset. If the next record was the monsters in mario, the table would then look like:


|Monsters|
|Monster 1| Goomba |
|Monster 2| Lakitu |
|Monster 3| Bowser |
|
__________________________________________|

   [first] [previous] [next] [last]

But to do that you would need to creat a XML document, with all of your monsters on it. For examples sake, we will save it as “TheMonsterPage.xml” It would look like:



<Mon_Page> <-- Your root element
<Monster Type="Som">
<Monster1>Rabite</Monster1>
<Monster2>Mushboom</Monster2>
<Monster3>Eye Spy</Monster3>
</Monster>
<Monster Type="Mario">
<Monster1>Rabite</Monster1>
<Monster2>Mushboom</Monster2>
<Monster3>Eye Spy</Monster3>
</Monster>
</Mon_Page>

Then, you would need to call this information into a table. All the XML document contains is data, you need to use HTML to put it into a viewable table. This may not be the way RPGC wants you to do tables, i don’t know, since i havn’t made a shrine yet. The width’s here are placeholders so i can remember the attributes of a table. It is just a peeve of mine not to have them. You can ignore them if you want.


<html>
<head>
<title>
Monsters! :0z
</title>
</head>
<body>

<xml id="TheMonsterPage" src="TheMonsterPage.xml"></xml>

   <table>
     <tr>
         <td width="120" bgcolor="blue">

           <span class="rowhead">Monster1:</span>
         </td>
         <td width="240" bgcolor="white">
           <span datasrc="#TheMonsterPage" datafld="Monster1"></span>
         </td>
     </tr>
     <tr><td width="120" bgcolor="blue">
           <span class="rowhead">Monster2:</span>

         </td>
         <td width="240" bgcolor="white">
           <span datasrc="#TheMonsterPage" datafld="Monster2"></span>
         </td>
     </tr>
     <tr><td width="120" bgcolor="blue">
           <span class="rowhead">Monster3:</span>
         </td>

         <td width="240" bgcolor="white">
           <span datasrc="#TheMonsterPage" datafld="Monster3"></span>
         </td>
     </tr>
   </table>
</body>
</html>

Then, all you would need to make would be the buttons. Just use HTML button tags with simple OnClick javascript attributes.


   <button onclick="TheMonsterPage.recordset.moveFirst()">
      |< First
   </button>

   <button onclick="TheMonsterPage.recordset.movePrevious(); if (TheMonsterPage.recordset.BOF) TheMonsterPage.recordset.moveFirst()">
        < Back   
   </button>
   <button onclick="TheMonsterPage.recordset.moveNext(); if (TheMonsterPage.recordset.EOF) TheMonsterPage.recordset.moveLast()">
      Forward >
   </button>
   <button onclick="TheMonsterPage.recordset.moveLast()">

      Last >|
   </button>

Basically, those codes tell the XLM parser to display the next entry in the recordset, and if there isn’t another entry, stop.

That should do it. >_> I tried to be in-depth, but if you need anything else, just ask.

I hate to break it to you, but that method also uses JavaScript, even if it isn’t explicit. ^^; There are plenty of ways to use JavaScript that aren’t as complicated.