i have a prob with php code
Posted: Mon Feb 10, 2003 6:11 am
the code on page one:
the code on page two:
the error
why ????
Code: Select all
<?php
if (!isset($idpage)) {
header("location: http://" .$_SERVER['HTTP_HOST'] .$_SERVER['PHP_SELF'] . "?type=htm/php&idpage=main");
}
else {
session_start();
session_register("types");
session_register("idpages");
$types = $type;
$idpages = $idpage;
}
?>Code: Select all
<?
include("includes/dbs.php");
$lk = mysql_connect($serv,$user,$pass) or die (mysql_error());
mysql_select_db($dbname[0],$lk);
$type = $_SESSION['types'];
$idpage = $_SESSION['idpages'];
switch ($type) {
case "htm/php":
$qur = "select kayword , path from linkssets order by id desc ";
$res = mysql_query($qur) or die (mysql_error());
$row = mysql_fetch_assoc($res);
if ($idpage == $row['kayword']) {
$inc = $row['path'];
}
else {
echo "Url error";
}
break;
}
?>
<html>
<body bgcolor="#808080">
<? include($inc); ?>#line of error
</body>
</html>Code: Select all
Warning: Failed opening '' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site13/fst/var/www/html/mainpage.php on line 23