You are here: Re: Strange error while trying to set a cookie « PHP Programming Language « IT news, forums, messages
Re: Strange error while trying to set a cookie

Posted by Fernando Rodrνguez on 09/26/41 11:37

Hello Pedro,

> Please post the rest of your code


OK, here's the full code:

-----------------------------------
<html>
<head>
<title>Untitled Document</title>
<?
$cookieValue = 'abra cadabra, pedo de cabra';
setcookie('aTestCookie', $cookieValue, time() + 3600);
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>



<ol>
<li> <a href="http://es2.php.net/FAQ.php">PHP FAQ</a></li>
<li> <a href="http://es.php.net/manual/en/tutorial.firstpage.php">PHP Tutorial</a></li>
<li> <a href="http://es.php.net/manual/en/index.php">PHP Manual</a></li>
</ol>


<form action="action.php" method="post">
<p>Your name: <input type="text" name="name" /></p>
<p>Your age: <input type="text" name="age" /></p>
<p><input type="submit" /></p>
</form>

</body>
</html>
------------------------------------

This causes the follwoing output:

Warning: Cannot modify header information - headers already sent by (output
started at c:\proyectos\websites\test\index.php:4) in c:\proyectos\websites\test\index.php
on line 6

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация