|
Hey, I have been trying to get categories on a certain page, just like this one. I own this site, and my mate Tyler Helton created it. I havent been able to get hold of him so i dont know what to do. I copied the code from it: Code:
<?php include 'n-13news/db.php'; include 'n-13news/config.php'; $sql = "SELECT * FROM $newscats"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)){ echo "<a href=\"?cat=$row[name]\">$row[name]</a><br>"; } if($_GET['cat']){ echo "<br><br>"; $cat = $_GET['cat']; include 'n-13news/index.php'; } if($_GET['id']){ echo "<br><br>"; include 'n-13news/index.php'; } ?> and put it in my page, I then created a category in the n-13news control panel, and then made a news post in that category. It turned out like this. When i click on the link 'School' it brings up with this: Code:
Fatal error: Cannot redeclare uniqueid2() (previously declared in /home/bass2k8/public_html/n-13news/config.php:34) in /home/bass2k8/public_html/n-13news/config.php on line 38 I checked that file, and found that line 34 had the contents of: Code:
$id = md5(uniqid(rand(), true)); and line 38 had the contents of: Code:
} I do not know what is wrong with it but i would like to get it working =D Hope u can help me Chris! | |||
| 04:02pm 22nd Sep 08 | Last edited by Bass2k8 at 04:02pm 22nd Sep 08 |
|
in 'news/index.php' at the top of it try removing the 2 lines that include db.php and config.php because you've already included these files manually yourself they don't need to be included there. | |||
| 11:58am 23rd Sep 08 | _______________ Chris - Network-13 |