Hi,
Thansk Vinod, i am successfull and now i am not facing the problems bz i have removed the every thing over and beneath this tag<? ?>.
But one thing is there, if we are using header(); inside a form and that will definitely have some body and title tags and then this php tag <? ?> will be between them, then how will v use this header function.
Example::::::::::::::::::::::::::::::::::::::::::: ::::::::::::Example
<?php
ob_start();
require_once("Connections/Session.php");
require("Connections/Cn.php");
require("header.php");
print "Weocome we are on the add-to-order.php page";
if(isset($HTTP_GET_VARS['e_']))
{
$stock_id=d_crypt($HTTP_GET_VARS['e_']);
mysql_select_db($database_Cn, $Cn);
$selectQry="select * from cart where cart_stock_id='".$stock_id."' and cart_session='".$sid."'";
$selectRes=mysql_query($selectQry) or print mysql_error();
if(mysql_num_rows($selectRes)<1)
{
$insertQry="insert into cart(cart_session, cart_stock_id, cart_date)
values('".$sid."','".$stock_id."',now())";
$insertRes=mysql_query($insertQry) or print mysql_error();
}
$today_minus_2=time()-172800;
$today_minus_2=date("y-m-d", $today_minus_2);
$deleteQry="delete from cart where cart_order_id='0' and cart_date<='".$today_minus_2."'";
$deleteRes=mysql_query($deleteQry) or print mysql_error();
}
header("Location: myorder.php");
exit(1);
?>
but what if this all the code comes inside the..............
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>Untitled Document</title>
</head>
<body>
<?php
............
..........
?>
</body>
</html> (Then it gives the error), so what is the solution.
Alot of Thanks.
|