_Street_Fighter
New Member
k - im doing one of those page.php?cat=name&id=1
heres an example of my page.php
what i want it to do is to include the "$cat$id.php" only if that page exists... so if the visitor types in whatever they want, it'll show news.php instead of an error or a blank page...
- SF
heres an example of my page.php
PHP:
<html>
<head>
<title>BLaH BLaH BLaH</title>
</head>
<body>
// I'll add my layout stuff here...
<?
if (!empty($cat) && !empty($id)) {
include("$cat$id.php");
} else {
include("news.php");
}
?>
// I'll add my layout stuff here...
</body>
</html>
what i want it to do is to include the "$cat$id.php" only if that page exists... so if the visitor types in whatever they want, it'll show news.php instead of an error or a blank page...
- SF