Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)delv
published in(发表于) 2013/12/29 4:39:34
PHP,存取,MySQL,数据库的一个例子_php资料_编程技术

PHP 存取 MySQL 数据库的一个例子_php资料_编程技术-你的首页-uuhomepage.com




PHP+MySQL 例子



请在文本区域输入数据并且确定









$connect_id=mysql_connect("localhost","username","password");
if(isset($txt)) {
$dbtime=date("Y-m-d H:i:s");
mysql_db_query("usernamedb","insert into test values (0,'$dbtime','$txt')");
}
?>













$result=mysql_db_query("usernamedb","select * from test");
while($userdb=mysql_fetch_row($result))
{
echo "<".$userdb[0].">: ".$userdb[1]." ".$userdb[2]."
n";
}
mysql_close($connect_id);
?>








If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759