我需要查詢數據庫,然後用結果填充文本框輸入。從MYSQL查詢填充文本框
我想
調用日期:
<td>
<?php
$selectedSPK=$_POST['SPKSelect'];
$assigned = $_POST['Sales_Exec'];
$date = $_POST['DateSelect'];
if ($selectedSPK)
{
$Call1query = "SELECT Call1 FROM Data WHERE SPKCustNo = '$selectedSPK' ";
$Call1result = mysql_query($Call1query);
while($row = mysql_fetch_array($Call1result)){
$Call1 = $row["$Call1Result"];
}
}
?>
<input type="text" name="Call1" id="Call1" value="<?php echo(htmlspecialchars($Call1)); ?>"/></td>
但是卻一無所獲了,我要去哪裏錯了,文本輸入看上去棘手的填充!
謝謝!
你不能做到這一點...'$ CALL1 = $行[ 「$ Call1Result」];'...給在'字段名$ row' –