Well the situation is as follows:
I want to update user details and I use a session to store the user id.
Form showuserdetails saveuserdetails
In showuserdetails i put a session as follows:
$id=$POST['id'];
session_start();
$SESSION['id']=$id;
session_write_close();
In saveuserdetails i retrieve the session:
<?php
require_once 'masterconfig.php';
$funame=$POST['funame'];
$luname=$POST['luname'];
$uage=$POST['uage'];
session_start();
$id=$SESSION['id'];
$mySQLstudent = "UPDATE fullname SET Firstname='$funame', Lastname='$luname', Age='$uage' WHERE ID='$id'";
mysql_query($mySQLstudent)or die('Could not select database:' . mysql_error());
echo "User details have been modified!<p></p>";
?>
The user details are updated but I get the following message, why is it so? Can some1 plz tell me. Thanks
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\php website\php and mysql\basic of using database - operations\savedetails.php:10) in c:\wamp\www\php website\php and mysql\basic of using database - operations\savedetails.php on line 16
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\wamp\www\php website\php and mysql\basic of using database - operations\savedetails.php:10) in c:\wamp\www\php website\php and mysql\basic of using database - operations\savedetails.php on line 16
User details have been modified!