첫 번째 게시판.

3307 단어
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title> </title>
</head>

<body>

<table width="678" align="center">
<tr>
<td colspan="2"><h1> </h1></td>
</tr>
<tr>
<td width="586"><a href="index.php"> </a> | <a href="zhu.html"> </a></td>
</tr>
</table>
<table align="center" width="678">
<tr>
<td>
<form name="form1" method="post" action="post.php">
<p>
Name:
<input name="name" type="text" id="name">
</p>
<p>Email:<input type="test" name="email" id="email"></p>
<p>
 :
</p>
<p>
</p>
<p>
<input type="submit" name="button" id="button" value=" ">
<input type="reset" name="button2" id="button2" value=" ">
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
<!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">
<head>

<title> </title>
</head>

<body>
<?php
 include("confg.php");
 $sq="SELECT * FROM `content`";
 $res=mysql_query($sq);
 while($row=mysql_fetch_array($res)){
	 echo $row[0];
 }
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title> </title>
</head>

<body>
<?php
echo "post";
//header("content-Type: text/html; charset=utf-8");
include("confg.php");
$name= $_POST['name'];
echo $name;
$email= $_POST['email'];
echo $email;
$sql = "insert into content (name,email) values ('$name','$email')";
mysql_query($sql);
?>
</body>
</html>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title> </title>
</head>

<body>
<?php
 $q=mysql_connect("localhost","root","");
 if(!$q)
 {
 die (' 。'.mysql_erro());
 }
 else
 echo " ";
  mysql_query("set names utf8");
  mysql_select_db("mysql",$q);
?>
</body>
</html>

좋은 웹페이지 즐겨찾기