I get this error-->Notice: Undefined index: name in C:\wamp\www\sedit.php on line 13
<?php
session_start();
$db_handle = mysql_connect("localhost", "root", "");
$db_found = mysql_select_db("fouzan_db", $db_handle);
if ($db_found) { echo "connected.<br/>";
if (isset($_POST['xyz']))
{
$me = $_POST['text'];
$sql="UPDATE `slogin` SET `data`='$me' WHERE username= '$_SESSION[name]'";
$result = mysql_query($sql); //to inform this is a query
echo "Thank you for using our mail form";
}
else {
echo "<form method='post' action='sedit.php' />
Message:<br />
<textarea name='text' rows='15' cols='80'>
</textarea><br />
<input type='submit'value='submit' name='xyz'/>
</form>";
} }
else {
print "Database NOT Found ";
mysql_close($db_handle);
}
?>
<html>
<body>
<head>
</head>
</body>
</html>