[练习]简易留言板制作

这是一个关于使用PHP制作简易留言板的实践练习,包括write.php(写留言页面)、save.php(保存数据)、connect.php(连接数据库)、board.php(留言板展示)、del.php(删除留言)和edit.php(编辑留言)等组成部分。
摘要由CSDN通过智能技术生成

[练习]简易留言板制作

🐷

写留言页面write.php:

<!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>简易留言板</title>
	<style type="text/css">
		.clearfix:after {
   content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden;}
		.clearfix {
   *zoom:1}

		
		.wrap {
    width:600px; margin:0 auto; }
		.content  textarea {
    width:100%; height:50px; margin:0 0 20px; }
		.content2 {
    margin:0 0 20px; }
		.content2 .user {
    float:left; }
		.content2 .submit {
    float:right; }
	
	</style>
	
	
</head>
<body>


<div class="wrap">
	<div class="board">
		<div class="boardlist">
		    <h1>写留言页面</h1>
			<form action="fromsave.php" method="post">
				<div class="content"><textarea name="content" id="" cols="30" rows="10"></textarea></div>
				<div class="content2 clearfix">
					<input class="user" type="text" name="user" />
					<input class="submit" type="submit" value="发表留言" />
				</div>
			</form>
	
		</div>
	</div>

</div>
	
	
</body>
</html>

fromsave.php 保存数据

<?php

include( "connect.php" );

$content = $_POST["content"];
$user = $_POST[
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值