![](/img/trans.png)
[英]PHP, HTML and MySqli - how to show all data from specific column in one table row
[英]pull specific table row column data to output in html using php
我如何從數據庫表中提取數據,並將該數據以某種形式放入只讀的textinput中,以供用戶查看。
<input readonly type="text" name="em1" id="em1"/>
對於此特定字段,我想使用$ username變量將會話從當前登錄用戶的行中名為wmyt000的列中提取數據,該變量與我創建的會話有關,以在名為cash_flow_plan的表中獲取當前登錄用戶的用戶名
即時通訊使用mysql和php
我沒有嘗試任何嘗試。 我一直在研究mysql_fetch_array
但是想要顯示其行的所有用戶信息。
我沒有嘗試任何嘗試。
嗯 好吧,如果有的話,您會知道您可以用它做更多的事。
如果您編寫查詢來限制結果,那么您將得到想要的結果。
$query = "SELECT wmyt000 FROM cash_flow_plan WHERE username = '$username'"
$row = mysql_fetch_row($query);
print_r($row); // now you can see the structure of your array. access it accordingly.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.