FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

PHP tables

 


Jack_Hammer
I need help making my website, I just need a simple script that will expand a table when you click the title (I'm sure you've seen tables like it before)

You have a header and some information but the information'Is hidden' in a row, but when you click the title it displays the row below it containing the 'hidden' information, Heres a basic sketch thing

bogger
i'll find you a site which you can borrow it from, for free, seeing as you're a member of the SMU Wink
Jack_Hammer
I need this script to be in PHP, thanks anyway Bogger for the javascript,
davmcmul
Jack_Hammer wrote:
I need this script to be in PHP, thanks anyway Bogger for the javascript,


Well in that case you may be out of luck, php is a purely server side scripting language, and what you are looking for really is a client side mechanism. I'm no php expert but it looks to me like php couldn't do that. If you are fully aware of php's capabilities and limitations and know this already, I'm sorry for making such a stupid point, otherwise, good luck on finding a different way of doing it Wink
SamiTheBerber
I have done one before Very Happy

If this was index.php, code would be this:
Code:
<h2><a href="index.php?heading=1">Heading1</a></h2>
<?php if ($heading ==1) { ?>
<p><a href="index.php?page=11">Link1</a></p>
<p><a href="index.php?page=12">Link2</a></p>
<p><a href="index.php?page=13">Link3</a></p>
<? } ?>
<h2><a href="index.php?heading=2">Heading2</a></h2>
<?php if ($heading ==2) { ?>
<p><a href="index.php?page=21">Link1</a></p>
<p><a href="index.php?page=22">Link2</a></p>
<p><a href="index.php?page=23">Link3</a></p>
<? } ?>
<h2><a href="index.php?heading=3">Heading3</a></h2>
<?php if ($heading ==3) { ?>
<p><a href="index.php?page=31">Link1</a></p>
<p><a href="index.php?page=32">Link2</a></p>
<p><a href="index.php?page=33">Link3</a></p>
<? } ?>
<h2><a href="index.php?heading=4">Heading4</a></h2>
<?php if ($heading ==4) { ?>
<p><a href="index.php?page=41">Link1</a></p>
<p><a href="index.php?page=42">Link2</a></p>
<p><a href="index.php?page=43">Link3</a></p>
<? } ?>


I hope that this helped Very Happy
gonzo
try


http://shorl.com/bapimoposure


Smile

_
Reply to topic    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.