Headers
Posted: Sat Mar 25, 2006 2:24 am
feyd | Please use
it gives me this error.
Warning: Cannot modify header information - headers already sent by (output started at E:\4thYear\dit3m2-0611\ec\ec project\count.php:3) in E:\4thYear\dit3m2-0611\ec\ec project\count.php on line 10
I read about the tutorial about headers wrote by site admin. but didnt understand why this happen.
Can u please tell me what is the wrong with this.
Geeshan
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
this is my codingCode: Select all
<html>
<body>
<?
$id = $_REQUEST['did'];
try
{
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn -> Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".realpath("db1.mdb"));
$conn -> Execute("update articles set hits=hits+1 where articleID=$id");
header("Location: http://svrmlb/webhost4/dit3m2-0611/EC/EC Project/Articles/aa.doc");
}
catch(Exception $g)
{
echo $g;
}
?>
</body>
</html>Warning: Cannot modify header information - headers already sent by (output started at E:\4thYear\dit3m2-0611\ec\ec project\count.php:3) in E:\4thYear\dit3m2-0611\ec\ec project\count.php on line 10
I read about the tutorial about headers wrote by site admin. but didnt understand why this happen.
Can u please tell me what is the wrong with this.
Geeshan
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]