Home > Backend Development > PHP Tutorial > 怎么把php从数据库中获得的值显示到前台表单中 具体例子

怎么把php从数据库中获得的值显示到前台表单中 具体例子

WBOY
Release: 2016-06-23 13:27:12
Original
1923 people have browsed it

怎么把php从数据库中获得的值显示到前台表单中 具体例子

就是 前端 在我给你发的这个页面 添加员工 下面再写一个表
表里是所有注册的会员的信息,可以删除




回复讨论(解决方案)

<?php$uid = 123123;$conn = mysql_connect('localhost', 'root', '123456'); //连接mysql$sql = 'SELECT *FROM `userinfo` WHERE `uid`=' . $uid; //sql语句$hd = mysql_query($sql,$conn); //查询$row = mysql_fetch_assoc($hd); //取数据?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">	<title>Document</title></head><body>	<table>		<tr>			<td><?php echo $row['name']; ?></td>			<td><?php echo $row['weixinhao'] ?></td>		</tr>	</table></body></html>
Copy after login

前段时间也遇到这个问题 参考下这位大神的方法吧 http://bbs.csdn.net/topics/390111915
但是得自己去下jquery_1.4.2.js插件

补充楼上的
mysql_select_db('database name');

前段时间也遇到这个问题 参考下这位大神的方法吧 http://bbs.csdn.net/topics/390111915
但是得自己去下jquery_1.4.2.js插件




。。。。。。
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template