PHP 닸혤 MySQL 鑒앴욋돨寧몸절綾

2018-09-07 14:50

阅读:474

  <body>
<center>
<h2>PHP+MySQL 절綾</h2>
<h3><u><font color=brown>헝瞳匡굶혐堵渴흙鑒앴깻할횅땍 </font></u></h3>
<form action="<? echo $PHP_SELF?>" method=POST>
<textarea cols=40 rows=5 name=txt></textarea>
<br>
<input type="submit" value="횅땍">
</form>
<?
$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)");
}
?>
<p>
</center>
<div align=center><center>
<table border=1 cellpadding=0 cellspacing=2 width=80%>
<tr><td>
<?
$result=mysql_db_query("usernamedb","select * from test");
while($userdb=mysql_fetch_row($result))
{
echo "<".$userdb[0].">:<font color=purple>".$userdb[1]."</font><font color=red>".$userdb[2]."</font><br>n";
}
mysql_close($connect_id);
?>
</td></tr>
</table>
<p>
</body>
</html>

±굶匡경홈백鱗諒宅걔乞貢묾谿撻唐,흔矜瘻潼,헝鬧츠鱗諒섟놔뇹×



评论


亲,登录后才可以留言!