Php 嗨,当用户从用户级别更新某个内容时,我需要更新的历史记录,我使用while循环来循环
嗨,我想做的是用户能够更新,然后它选择他们的所有更新,循环并显示他们的所有更新。但是,它只在表中显示一个更新,我需要所有行,然后它就会消失。mysql\u close应该在外面,而loopmysql\u不受欢迎尝试使用mysqli\u或PDO您必须使用mysqli\u*当我使用mysqli时,它会在屏幕上变为空白Php 嗨,当用户从用户级别更新某个内容时,我需要更新的历史记录,我使用while循环来循环,php,mysql,sql-server,Php,Mysql,Sql Server,嗨,我想做的是用户能够更新,然后它选择他们的所有更新,循环并显示他们的所有更新。但是,它只在表中显示一个更新,我需要所有行,然后它就会消失。mysql\u close应该在外面,而loopmysql\u不受欢迎尝试使用mysqli\u或PDO您必须使用mysqli\u*当我使用mysqli时,它会在屏幕上变为空白 <?php include 'core/init.php'; include 'includes/overall/header.php'; if(isset($_POST[
<?php
include 'core/init.php';
include 'includes/overall/header.php';
if(isset($_POST['btn_submit'])){
$sqlQuery = mysql_query("UPDATE `table1` SET `ATR`='".mysql_real_escape_string($_POST['ATR'])."' ");
$result = "SELECT * FROM position";
$finalResult = mysql_query($result) or die(mysql_error());
}
?>
<h2><font color="blue">Table that shows edit history:</h2>
<table border="1" cellpadding="5px" cellspacing="0" width="60%">
<tr>
<th><strong>row1</strong></th>
<th><strong>row2</strong></th>
<th><strong>row3</strong></th>
<th><strong>row4</strong></th>
<th><strong>row5</strong></th>
</tr>
<?php
while($row5 = mysql_fetch_assoc($finalResult)) {
echo "<td>".$row5['row1']."</td>";
echo "<td>".$row5['row2']."</td>";
echo "<td>".$row5['row3']."</td>";
echo "<td>".$row5['row4']."</td>";
echo "<td>".$row5['row5']."</td>";
continue;
?>
<?php
mysql_close();
}
mysql_free_result($sqlQuery);
?>