Hi guys i have switch statement that calls to .php pages but for some reason it doesn’t , the pages are not displayed. help !
Below is the attachment whole script of my admin home page.
[code]<?php
error_reporting(1);
session_start();
$name=$_SESSION[‘eid’];
if($_REQUEST[‘log’]==‘out’)
{
session_destroy();
header(“location:index.php”);
}
else if($name=="")
{
header(“location:index.php”);
}
?>
Add Item
<a href="?con=view"><font color="#660066" size="+2">View All</font>
</a><br/><br/>
<a href="?con=ord"><font color="#660066" size="+2">Orders(
<?php
include(“config.php”);
$rows_returned=0;
$sql= ‘SELECT * FROM my-first’;
$rs=$db_connect->query($sql);
if($rs === false) {
trigger_error('Wrong SQL: ’ . $sql . ’ Error: ’ . $db_connect->error, E_USER_ERROR);
} else {
$rows_returned = $rs->num_rows;
}
?>)</font>
</a>
<br/><br/>
<a href="?con=fdbk"><font color="#660066" size="+2">Feedback(
<?php
include("config.php");
$rows_returned=0;
$sql=‘SELECT * FROM My -second’;
$rs=$db_connect->query($sql);
if($rs === false) {
trigger_error('Wrong SQL: ’ . $sql . ’ Error: ’ . $db_connect->error, E_USER_ERROR);
} else {
$rows_returned = $rs->num_rows;
}
echo $rows_returned;
?>)
</div>
case ‘view’:include(“viewanitem.php”);
break;
case ‘ord’:include(“orders.php”);
break;
case ‘fdbk’:include(“fdbk.php”);
break;
case ‘hm’:include(“hm.php”);
break;
}
if($_REQUEST[‘view’])
{
include(“viewtable.php”);
}
?>
Thanxs guys
admin_home.txt (2.82 KB)