从数据库中检索数据并在文本框/文本区域中显示 [英] Retrieving data from database and displaying in textbox/text area

查看:83
本文介绍了从数据库中检索数据并在文本框/文本区域中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


任何人都可以给我一个解决问题的想法..我的问题是,我想从数据库中检索数据并在文本框中显示。 ..如果有人有这方面的一些好教程的链接请告诉我..如果有人能解释我会非常感谢...

Hi All


Can anyone give me an idea to solve the problem.. My Problem is ,, I want to Retrieving data from database and displaying in textbox... If anybody have link of some good tutorial on this pls let me know..Or if anybody can explain I would be very thankful...

推荐答案

你是提出一个非常普遍的基本问题,我相信这个论坛试图帮助解决更具体的问题。但是为了让您入门,让我们假设您希望在服务器端使用PHP与数据库进行交互,然后生成HTML输出以发送到用户的浏览器。并且数据库值将显示在HTML在用户浏览器中生成的页面中的表单中。


因此,您需要知道如何调用PHP脚本服务器,如何让PHP脚本连接到您的数据库,如何做选择查询从数据库表中获取所需的数据,然后如何将这些值放入PHP变量中,然后可以在生成页面的HTML中输出。因此,您还需要知道如何使用所需的表单生成HTML,以及如何将来自数据库的PHP变量放置在适当位置的表单中,而不仅仅是硬编码。那里的静态变量。


一次只需要上面的一个,看看PHP,SQL,HTML等的一些文档。
You are asking a very general basic question, and I believe this forum tries to help with more specific problems. But to get you started, let us assume you wish to use PHP on the server side to interact with your database and then produce HTML output to send to the user''s browser. And the database values are to be shown in the forms in the page that the HTML produces in the user''s browser.

So you need to know how to invoke a PHP script on the server, how to get the PHP script to connect to your database, how to do a "select" query to get the data you want out of the database table or tables, how to then put those values into PHP variables which then can be outputted in the HTML that will produce the page. So you also need to know how to produce the HTML with the forms that you want, and how to place the PHP variables that came from the database into the forms in the proper place rather than just "hard coding" static variables there.

Just take the above one at a time and look at some documentations for PHP, SQL, HTML, etc.


谢谢coolsti


如何将来自数据库的PHP变量放在适当位置的表单中.ie在txt框或txt区域......


我只是想知道上面这行...其他我知道的事情..
Thanks coolsti

How to place the PHP variables that come from the database into the forms in the proper place .i.e. in txt box or txt area...


I just want to know obout the above line....Other things i know..



大家好


任何人都可以给我一个解决问题的想法..我的问题是,,我想从数据库中检索数据并在文本框中显示...如果有人有这方面的一些好教程的链接请告诉我..如果有人能解释我会非常感谢...
Hi All


Can anyone give me an idea to solve the problem.. My Problem is ,, I want to Retrieving data from database and displaying in textbox... If anybody have link of some good tutorial on this pls let me know..Or if anybody can explain I would be very thankful...





我看过你关于插入数据问题的最后一篇帖子,所以我想你知道如何使用PHP来获取数据..并把它放到他们变成了变数。所以你可以简单地执行以下操作在文本框中显示它...

1.

[PHP]

<?php

//你的PHP代码用于获取数据并将它们变成变量

?>


< input type =" ;文本"名称= QUOT; XYZ" value =<?php echo

Hi,
I''ve seen your last post regarding inserting data problem so i guess you know how to use PHP to get data.. and put it them into variable. So you can simple do the following to display it in the text box...
1.
[PHP]
<?php
//your php code for fetching data and geting them into variable
?>

<input type="text" name="xyz" value=<?php echo


这篇关于从数据库中检索数据并在文本框/文本区域中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆