语言 :
SWEWE 会员 :登录 |注册
搜索
百科社区 |百科问答 |提交问题 |词汇知识 |上传知识
问题 :PHP写的留言簿写不上留言,这是什么原因呢?
游客 (104.224.*.*)
类别 :[技术][计算机技术]
问题 描述 :
代码:
<html>
<head></head>
<body>
<p><b>留言簿</b></p>
<p><br>
<a href="guestbook.php">查看留言;</a></p>
<p><a href="index.php">返回主页;</a><br>
</p>
<hr />
<?php
$con=mysql_connect("rds994h2o231a59060gp.mysql.rds.aliyuncs.com", "r6s3iso03h", "******") or die("连接失败");
mysql_select_db("r6s3iso03h", $con);

if ($_POST['submit'])
{$sql="insert into guestbook(g_id,g_content,g_name,g_date)"."values('$_post[g_content]','$_post[g_name]',now())";

mysql_query($sql,$conn);
echo "留言成功";}
?>
<form action="guestbookadd.php" method="post">
留言内容;
<textarea name="g_content"></textarea><br/>
留言者;
<input type="text" name="g_name"/><br/>
<input type="submit" name="submit" value="提交" />
</form>
</body>
</html>
我来回答 [游客 (3.134.*.*) | 登录 ]

图片 :
类型 :[|jpg|gif|jpeg|png|] 字节 :[<2000KB]
语言 :
| 校验代码 :
所有 答案 [ 10 ]
[游客 (102.165.*.*)]答案 时间 :2024-05-02
The Little-Known Benefits Of Audi Key Fobs Audi Lost Key
[游客 (102.165.*.*)]答案 时间 :2024-05-02
10 Things Everyone Hates About Second Hand Mobility Scooters For Sale Second
Hand Mobility Scooters For Sale Affordable scooters
[游客 (37.143.*.*)]答案 时间 :2024-05-02
10 Things Your Competitors Teach You About Robot Vacuum For Pet Hair automatic vacuum cleaner robot (https://Www.Google.pn)
[游客 (102.165.*.*)]答案 时间 :2024-05-02
14 Questions You're Uneasy To Ask Tommy Hilfiger Bag Ladies tommy hilfiger bag for mens (Lula)
[游客 (102.165.*.*)]答案 时间 :2024-05-02
A Look At The Secrets Of Car Diagnostic Near Me mobile diagnostics near me (https://www.cheaperseeker.com)
[游客 (5.45.*.*)]答案 时间 :2024-05-02
How To Outsmart Your Boss Audi A3 Key Battery replacement audi car key
[游客 (5.45.*.*)]答案 时间 :2024-01-26
认为您是做行人事故律师的完美人选?
做这个测试事故律师杰克逊维尔
[游客 (5.45.*.*)]答案 时间 :2024-01-22
A Step-By-Step Guide For Choosing Your Accident Injury Lawyers Near Me Accident injury
Lawyers
[游客 (37.143.*.*)]答案 时间 :2024-01-21
The Reason Why Accident Attorneys Near Me In 2023 Is The Main Focus Of
All People's Attention. 2023 accident Attorneys near Me
[会员 (闪电)]答案 时间 :2016-04-14
if ($_POST['submit'])
{$sql="insert into guestbook(g_id,g_content,g_name,g_date)"."values('$_post[g_content]','$_post[g_name]',now())";
改为
if ($_POST['submit'])
{$sql="insert into guestbook(g_id,g_content,g_name,g_date)"."values('$_POST[g_content]','$_POST[g_name]',now())";

注意$_POST要大写

搜索

版权申明 | 隐私权政策 | 版权 @2018 世界百科知识