Note that there are some explanatory texts on larger screens.

plurals
  1. POwarning: can not modify header information -header already sent
    text
    copied!<p>Today first time I use cookie but I am facing a warning</p> <blockquote> <p>Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\session.php:11) in E:\xampp\htdocs\home_page.php on line 7</p> </blockquote> <p>This is my code:</p> <pre><code>&lt;?php include("session.php"); ?&gt; &lt;?php $Month = 2592000 + time(); //this adds 30 days to the current time setcookie(AboutVisit, date("F jS - g:i a"), $Month); ?&gt; &lt;?php if(isset($_COOKIE['AboutVisit'])) { $last = $_COOKIE['AboutVisit']; echo "Welcome back! You last visited on ". $last; } else { echo "Welcome to our site!"; } ?&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Home Page&lt;/title&gt; &lt;script src="flowplayer-3.1.4.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body bgcolor="white"&gt; &lt;?php include('search_file.php'); ?&gt; &lt;font color="red"&gt;&lt;b&gt;&lt;h2 align="center"&gt;Deepak Narwal Welcomes You&lt;/h2&gt;&lt;/b&gt;&lt;/font&gt; &lt;hr size="2" width="50%"&gt; &lt;a href="logout_file.php"&gt;&lt;h3 align="right"&gt;Sign Out&lt;/h3&gt;&lt;/a&gt; &lt;a style="display:block;width:250px;height:200px;" id="player"&gt; &lt;/a&gt; &lt;script language="JavaScript"&gt; flowplayer("player", "flowplayer-3.1.5.swf" , { clip: { autoPlay : false, autoBuffering: true}, playlist: [ 'video.flv', 'flowplayer.flv'] }); //create a object of clip name &lt;/script&gt; &lt;object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" align="right" width="320" height="260" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"&gt; &lt;param name="custommode" value="none" /&gt; &lt;param name="loop" value="true" /&gt; &lt;param name="autoPlay" value="false" /&gt; &lt;param name="autoBuffering" value="true" /&gt; &lt;param name="src" value="http://localhost/idiot.mkv" /&gt; &lt;embed type="video/divx" src="http://localhost/idiot.mkv" custommode="none" width="250" height="200" loop="true" autoPlay="false" pluginspage="http://go.divx.com/plugin/download/"&gt; &lt;/embed&gt; &lt;/object&gt; &lt;br /&gt;&lt;a href="upload_file.php"&gt;&lt;h4&gt;Up-Load Files&lt;/h4&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt; &lt;a href="list_files.php"&gt;&lt;h4&gt;List All Up-Loaded Files&lt;/h4&gt;&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>What is this error and how can I hide warnings from my webpage?</p> <p>Is there any particular place for putting cookies or can I put cookie anywhere like above cookie?</p> <p>This is my session.php</p> <pre><code> &lt;?php session_start(); if(!isset($_SESSION['employee'])) { echo "Your are Logged Out"; exit; } else { echo "Welcome Mr.".$_SESSION['employee']['username']."; } ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload