Editcontact.php不能從後獲得textarea的值
<form method="post" autocomplete="off" action="savecontact.php" id="form" name="form">
<table>
<tr>
<td>Specific Address in Office</td>
<td><textarea name="txtspecificaddress" id="txtspecificaddress" rows="4" cols="50" placeholder="Type specific address within the office. e.g. Room Number, Section Name or Division Name etc."><?php echo $_SESSION['oldspecificaddress']; ?></textarea></td>
</tr>
</table>
</form>
上savecontact.php, 我檢索 'txtspecificaddress' 價值
if(isset($_POST['txtspecificaddress']))
{
$specificaddress=mysqli_real_escape_string(trim($_POST['txtspecificaddress'] ));
}
echo $specificaddress;
,但它說明不了什麼。我檢查了$ _SESSION ['oldspecificaddress']的值。有人可以幫忙嗎?我是PHP新手。
因爲你正在使用'mysqli_real_escape_string'錯誤......請手動怎樣看http://php.net /manual/en/mysqli.real-escape-string.php – nospor
閱讀轉義函數的手冊。 –
沒有窗體更新? – devpro