I Have user_id feld in both order and user table ..
This Coding Is Not Working it will not show any values ..
please help me ...
thank you ..
<?php
require_once 'inc/connect.php';
//require_once 'library/database.php';
//checkUser();
if($_SESSION['signed_in'])
{
require_once 'inc/header.php';
echo 'Hello <b>' . htmlentities($_SESSION['user_id']) . ' </b>Welcome Back<br>';
$sql = "SELECT od_id, od_date, od_status, od_shipping_first_name, SUM(pd_price * od_qty) + od_shipping_cost AS od_amount FROM tbl_order WHERE user_id = '".$_SESSION['user_id']."'";
$result = mysql_query($sql);
?>
<p> </p>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="text">
<tr align="center" id="listTableHeader">
<td width="411">Order ID</td>
<td width="225">Order Date</td>
<td width="120">Order Status</td>
<td width="120">Name</td>
<td width="120">Amount</td>
<td width="70">Delete</td>
</tr>
<?php
while($row = mysql_fetch_assoc($result)) {
extract($row);
if ($i%2) {
$class = 'row1';
} else {
$class = 'row2';
}
$i += 1;
?>
<tr class="<?php echo $class; ?>">
<td><?php echo $od_id; ?></td>
<td><?php echo $od_date; ?></td>
<td width="120" align="center"><?php echo $od_status; ?></td>
<td width="120" align="center"><?php echo $od_shipping_first_name ; ?></td>
<td width="120" align="center"><?php echo $od_amount; ?></td>
<td width="70" align="center"><a href="javascript:deleteOrder(<?php echo $od_id; ?>);">Delete</a></td>
</tr>
<?php
} // end while
?>
<tr>
<td colspan="6"> </td>
</tr>
<tr>
<td colspan="6" align="right"> </td>
</tr>
</table>
<p> </p>
<?php
require_once 'inc/footer.php';
}
else
{
require_once 'inc/header.php';
?>
<table width="200" border="0" align="center">
<tr class="entryTableHeader">
<td align="center">Login In To Admin Panel</td>
</tr>
<tr class="content">
<td align="center"a><a href="admin/index.php">Admin Panel</a></td>
</tr>
</table>
<?PHP
header( 'Location: admin/index.php' ) ;
require_once 'inc/footer.php';
}
?>
And I want to Know How Pass session Id to database when Submitting Form .. as hidden feld ..
How add php report ..
Thank You ... :)


Sign In
Create Account

Back to top









