I have newly registered my domain and everything is working fine but when i use session_start() on my php pages i get this warning
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\inetpub\vhosts\mywebsite.com\httpdocs\sample\new.php:1) in D:\inetpub\vhosts\mywebsite.com\httpdocs\sample\new.php on line 3
`Warning: session_start() [function.session-start]: Cannot send session
cache limiter -
headers already sent (output started at
D:\inetpub\vhosts\mywebsite.com\httpdocs\sample\new.php:1) in
D:\inetpub\vhosts\mywebsite.com\httpdocs\sample\new.php on line 3`
What do i need to do to get rid of this warning I an unable to use session_start() on my php pages.please help me in fixing this.any help is greatly appreciated.Thanks
Update This is my index and profile.php pages
my index.php page
<?php
session_start();
?>
<!doctype HTML> some html coding goes on
my profile.php page
<?php
session_start();
$con = mysql_connect('some', 'some', 'some');
$email = $_POST["nemail"];
$password = $_POST["npassword"];
$month = $_POST["nmonth"];
$dayy = $_POST["ndate"];
$yearr = $_POST["nyear"];
$gender = $_POST["ngender"];
$sname = $_POST["sname"];
$status = $_POST["nrelation"];
$rannum = 1;
$birthday = $month . " " . $dayy . " " . $yearr;
mysql_select_db("users_names");
$_SESSION['unique']= $rannum;
?>
I get this error when i jump to profile.php from index.php
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\inetpub\vhosts\website.com\httpdocs\sample\profile.php:1) in D:\inetpub\vhosts\website.com\httpdocs\sample\profile.php on line 3
I want to start session on index page but i want to assign values to session variables in profile.php page thats what i did in profile.php in the last line