Why it won't send this to mysql.Connection is ok.Here is the code.
<?php
$connect = mysql_connect ("localhost","root","") or die (mysql_error());
mysql_select_db ("login4") or die (mysql_error());
session_start();
$_SESSION['username'];
$username1 = $_SESSION['username'];
$username = $_POST['username'];
$submit = $_POST['submit'];
$micro = $_POST['micro'];
if ($submit){
$queryreg = mysql_query("
INSERT INTO messages VALUES ('','$micro','$username')
");
}
?>
<?php
$sql = mysql_query("SELECT * FROM micro");
$numberofrows = mysql_num_rows ($sql);
$micro = '' ;
while($row = mysql_fetch_array($sql)){
$messages = $row["micro"];
$micro .= ''.$username.'<br />'.$micro.'<br />' ;
}
?>
<?php
echo $micro; ?>
<form action="micro.php" method="post">
<input type="text" value="<?php echo $username1 ?>" name="username" readonly="readonly" />
<br />
<textarea name="micro"></textarea>
<br />
<input type="submit" name="submit" value="Blab" />
</form>