我使用XAMPP,phpmyadmin,甚至在更正了很多次後,在輸出中它只顯示更新的記錄。數據沒有被插入。將textarea數據顯示到mysql
<?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>";
}
?>
請重試你的問題,沒有人actualy能夠進一步理解這個 – GreenRover
請重新格式化您的代碼,並解釋你的問題... – jtheman
請重新格式化並顯示我們的表單標籤 –