I'm using XAMPP, phpmyadmin and even after correcting it so many times, in output it only shows updated records. The data is not being inserted somehow.
<?php 
$name=$_POST['comment']; 
$link=mysql_connect('localhost', 'root','' ); 
mysql_select_db('comments',$link);
mysql_query("insert into comment values('$name'"); 
echo '<script type="text/javascript"> 
<!-- window.location = "display1.php" --> </script>'; 
?>
display1.php
<?php 
$link=mysql_connect('localhost', 'root','' ); 
mysql_select_db('comments',$link); 
echo "Updated records:<br>"; 
$result=mysql_query("select * from comment"); 
while($row=mysql_fetch_array($result)) {
    $tempname=$row['commenting']; echo $tempname."<br>";
}
?>
 
     
     
    