gpt4 book ai didi

php - 使用php拉取特定表行列数据以html形式输出

转载 作者:行者123 更新时间:2023-11-29 14:19:47 25 4
gpt4 key购买 nike

如何从数据库表中提取数据并将该数据放入表单中的只读文本输入中以供用户查看。

<input readonly type="text" name="em1" id="em1"/>

对于这个特定字段,我想使用 $username 变量和我创建的 session 从当前登录用户行中名为 wmyt000 的列中提取数据,以获取名为 cash_flow_plan 的表中当前登录用户的用户名

我使用mysql和php

我还没有尝试过任何事情。我正在调查mysql_fetch_array但想要显示其行的所有用户信息。

最佳答案

i havnt attempted to try anything yet.

是的。好吧,如果你有的话,你就会知道你可以用它做比你想象的更多的事情。

如果您编写一个限制结果的查询,那么您将得到您想要的结果。

$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.

关于php - 使用php拉取特定表行列数据以html形式输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11935391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com