留言板(这是一个项目)
贵哥的编程之路(热爱分享)
IT讲师(csdn研修院 网易云课堂 51cto学堂 php中文网),努力进步中。我想看看我的巅峰在哪里。
展开
-
PHP项目:留言板开发(删除功能)
del.php 地址栏上输入localhost/del.php?id=1 <?php include 'conn.php'; $id = $_GET['id']; $query="delete from message where id=".$id; mysql_query($query); ?> //引入conn文件,使用get方式获取id,使用sql语句来删除id <?php //页面跳转,实现方式为javascript $url = "list.php"; echo "&l.原创 2021-10-04 23:31:58 · 819 阅读 · 0 评论 -
PHP项目:留言板开发(查看功能)
<!DOCTYPE html> <html lang="utf-8"> <head> <?php include ("conn.php"); ?> <link href="css.css" rel="stylesheet" type="text/css"> </head> <table width=500 border="0" align="center" cellpadding="5" cellspac原创 2021-10-04 23:21:46 · 762 阅读 · 0 评论 -
PHP项目:留言板开发(表单提交后的页面处理)
add.php <?php include ("conn.php"); $id=$_POST['id']; $user=$_POST['user']; $title=$_POST['title']; $content=$_POST['content']; if ($_POST['submit']){ $sql="insert into message(id,user,title,content,lastdate)values('','$user','$title','$content',now()原创 2021-10-04 23:18:40 · 808 阅读 · 0 评论 -
PHP项目:留言板开发(html+css页面的实现)
add.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="css.css" rel="stylesheet" type="text/css"> <title>Title</title> <?php include ("add.php")?> </he原创 2021-10-04 23:14:33 · 1294 阅读 · 0 评论 -
PHP项目:PHP链接数据
<?php $conn =mysql_connect("localhost", "root", "") or die("数据库链接错误"); mysql_select_db("cyg", $conn); mysql_query("set names 'utf8'"); //使用utf-8中文编码; ?>原创 2021-10-04 23:06:33 · 658 阅读 · 0 评论 -
php项目:留言板(开发)
CREATE TABLE `message` ( `id` tinyint(1) NOT NULL auto_increment, `user` varchar(25) NOT NULL, `title` varchar(50) NOT NULL, `content` tinytext NOT NULL, `lastdate` timestamp NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCR原创 2021-10-04 23:04:15 · 754 阅读 · 0 评论