Posted by SOR on 07/10/05 18:08
<comp.lang.php , SOR , webmaster@sparesorrepair.co.uk.INVALID>
<MPG.1d3a75a6820436be989ca7@no-cancel.newsreader.com>
<Sun, 10 Jul 2005 01:06:53 +0100>
> Putting a <br> at the end of the <a> tags would probably sort it .
>
Either way the following is probably a better way of doing it as it does
away with 2 include files .
inc_nav.php
<?php $rigga = $_GET['pass']; ?>
<a href="index.php" class="butnav">HOME</a><br>
<a href="group_one.php?pass=1" class="butnav">GROUP ONE</a><br>
<?php if ($rigga==1) {g_one();} ?>
<a href="group_two.php?pass=2" class="butnav">GROUP TWO</a><br>
<?php if ($rigga==2) {g_two();} ?>
<a href="index.php" class="butnav">HOME</a><br>
<?php
function g_one()
{
print "<a href=index.php?pass=1 class=butnav>..... GROUP ONE</a><br>";
print "<a href=index.php?pass=1 class=butnav>..... GROUP ONE</a><br>";
}
?>
<?php
function g_two()
{
print "<a href=index.php?pass=2 class=butnav>..... GROUP TWO</a><br>";
print "<a href=index.php?pass=2 class=butnav>..... GROUP TWO</a><br>";
}
?>
Navigation:
[Reply to this message]
|