Hello everyone is there any way to redirect page without header() and java script ? is php has another function that can redirect page ?
first page ...
<?php
$item_query=mysql_query("SELECT * FROM items ") or die(mysql_error());
while($run_item=mysql_fetch_array($item_query))
{
$itemid=$run_item['item_id'];
$name=$run_item['productname'];
echo "<br/>";
echo "<a href='product.php?product=$userid'>$username</a>";
}
?>
second page ...
if(isset($_GET['product'] ) && !empty($_GET['product'])){
$itemid=$_GET['product'];
}else{
$itemid= $_SESSION['item_id'];
}
$Item_query=mysql_query("SELECT * FROM item WHERE item_id=$itemid") or die( mysql_error());
while($run_item= mysql_fetch_array($mem_query)){
$meid=$run_item['item_id'];
$name=$run_item['name'];
}
$my_id=$_SESSION['item_id'];
echo '<h3> Your Name: '.$name."<br/>ID: ".$meid.'</h3>';
$sendquery=mysql_query("SELECT fid FROM order WHERE inorder= $itemid AND userid= $my_id ")or die (mysql_error());
echo "<a href='actions.php?action=send&product=$itemid'> ordered </a>";
third page... wher my second page come here when i click on ordered link
$action=$_GET['action'];
$itemid=$_GET['item'];
$my_id=$_SESSION['item_id'];
if($action=='send'){
mysql_query("INSERT INTO order VALUES ('','$my_id','$userid')");
}
header('location:items.php?item=$itemid');
//header('location:items.php?item=$itemid');----> here i am getting error
Unknown column '$item' in 'where clause' i get this error when i click on ordered link.