Jump to content

Session Cookie Help


wright67uk

Recommended Posts

I'm trying out session cookies for the first time, and I have run into some troubles.

Im recieving the following errors below;

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at filelocation/filename:3) in filelocation/filename on line 4

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at filelocation/filename:3) in filelocation/filename on line 4

 

Any help would be great!

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tree Quoter</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="content_slider_style.css" />
<link rel="stylesheet" type="text/css" href="form.css" />
<script type="text/javascript" src="js/jquery.1.3.2.min.js" ></script>
<script type="text/javascript" src="js/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 3000, true);
});
</script>
</head>
<body>
<div id="templatemo_body_top">
<div id="templatemo_body_bottom">
<div id="templatemo_wrapper">
<div id="templatemo_header">
 <div id="site_title">
	 <h1><a href="http://www.treequoter.co.uk"><strong>Tree Quoter</strong><span>Expert tree surgeons, competitive quotes</span></a></h1>
 </div> <!-- end of site_title -->
</div>

<div id="templatemo_menu">
 <ul>
	 <li><a href="index.html" class="current">Home</a></li>
	 <li><a href="services.html">Get quotes</a></li>
	 <li><a href="blog.html">Get Clients</a></li>
	 <li><a href="gallery.html">More info</a></li>
	 <li><a href="contact.html">Contact Us</a></li>
 </ul>	
</div> <!-- end of templatemo_menu -->

<div id="templatemo_main_wrapper_01">
<div id="templatemo_main_wrapper_02">
<div id="templatemo_main_wrapper_03">
<div id="templatemo_main">


<div id="templatemo_slider">

<div id="featured" >
<ul class="ui-tabs-nav">
	 <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-1"><a href="#fragment-1"><img src="images/content_slider/image1-small.jpg" alt="" /><span>Professional tree felling by expert tree surgeons</span></a></li>
	 <li class="ui-tabs-nav-item" id="nav-fragment-2"><a href="#fragment-2"><img src="images/content_slider/image2-small.jpg" alt="" /><span> Tree removal, a section at a time</span></a></li>
	 <li class="ui-tabs-nav-item" id="nav-fragment-3"><a href="#fragment-3"><img src="images/content_slider/image3-small.jpg" alt="" /><span>Brush chipping and recycling</span></a></li>
	 <li class="ui-tabs-nav-item" id="nav-fragment-4"><a href="#fragment-4"><img src="images/content_slider/image4-small.jpg" alt="" /><span>
	 Stump Grinding, creating new spaces</span></a></li>
 </ul>
 <!-- First Content -->
 <div id="fragment-1" class="ui-tabs-panel" style="">
 <img src="images/content_slider/image1.jpg" alt="" />
 <div class="info" >
<h2><a href="#" >Professional Tree Felling</a></h2>
<p>An expert tree surgeon will be able to safely fell a diseased or dangerous tree, sometimes even in confined spaces.... <a href="#" >read more</a></p>
</div>
 </div>
 <!-- Second Content -->
 <div id="fragment-2" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/content_slider/image2.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Tree Removal</a></h2>
<p>Sometimes the only safe way to remove a tree is to take away a section at a time, roping as we go.... <a href="#" >read more</a></p>
</div>
 </div>
 <!-- Third Content -->
 <div id="fragment-3" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/content_slider/image3.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Brush Chipping</a></h2>
<p>Brush cut from your tree is often chipped and taken away. This can then be spread over garden beds or burnt in power stations.... <a href="#" >read more</a></p>
	 </div>
 </div>
 <!-- Fourth Content -->
 <div id="fragment-4" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/content_slider/image4.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Stump Grinding</a></h2>
<p>Post tree removal, people often ask for their stump to be removed, creating extra space in their bed, or simply for aesthetics.... <a href="#" >read more</a></p>
	 </div>
 </div>
</div>
</div> <!-- end of templatemo_slider -->

<div id="clientform">
<p>Please enter your details below, and 3 of your local tree surgeons will get in touch! or <a href="login.html">login</a><br /><br/></p>

<?php
$_SESSION['name'] = $_POST['name'];
$_SESSION['email'] = $_POST['email'];
$_SESSION['phone'] = $_POST['phone'];
$_SESSION['postcode'] = $_POST['postcode'];
$_SESSION['type'] = $_POST['type'];
$_SESSION['start'] = $_POST['start'];
?>

<form action="client_start_2.php" method="post">
<p class="left"><label for="name" class="required">Your Name</label><br>
<input class="field required" id="name" name="name" placeholder="Your Name" required tabindex="1" type="text" ></p>
<p class="right"><label for="email" class="required">Your Email Address</label><br>
<input class="field required" id="email" name="email" placeholder="Your Email Address" required tabindex="1" type="email"></p>
<div style="clear:both" />
<p class="left"><label for="phone">Your Phone Number</label><br>
<input class="field" id="phone" name="phone" placeholder="Your Phone Number" tabindex="3" type="text"></p>
<p class="right"><label for="postcode">Your Full Postcode</label><br>
<input class="field" id="postcode" name="postcode" placeholder="Your Full Postcode" tabindex="4" type="text"></p>
<div style="clear:both" />
<p class="left"><label for="type" class="required">Type of works</label><br>
<select class="dropdown required" id="type" name="type" required="required" tabindex="9">
<option value=""> Please Select </option>
<option value="1">Tree Surgery</option>
<option value="2">Stump Grinding</option>
<option value="3">Tree Surgery and Stump Grinding</option>
</select></p>
<p class="right"><label for="phone">Ideal Start Date</label><br>
<input class="field" id="start" name="start" placeholder="Your Ideal Start Date" tabindex="5" type="text"></p>
<div style="clear:both">

<p class="left"><label for="question" class="required">Brief Description of Works</label><br>
<textarea class="textarea required" id="description" name="description" placeholder="Job Description" required tabindex="10"></textarea></p>
<p class="button"><button tabindex="6" type="submit">Submit</button></p>
<div style="clear:both" />
</form>

</div> <!-- end of clientform -->

</div></div></div></div></div></div></div>
<div id="templatemo_footer">

 <a href="index.html" class="current">Home</a> | <a href="services.html">Get Quotes</a> | <a href="blog.html">Get Clients</a> | <a href="gallery.html">More Info</a> | <a href="contact.html">Contact Us</a> <br /><br />
 Copyright © 2012 <a href="#">Tree Quoter</a> | Designed by <a href="http://www.websites.cx" target="_parent">Websites.cx</a>

</div> <!-- end of templatemo_footer -->
</div>
</div> <!-- end of wrapper -->
</div>
</div>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.