大家帮忙看看,我是新手
刚学PHP问题解决不了帮忙看下就是简单的提交表单,保存到数据库中,结果出错
错误为:Fatal error: Function name must be a string in D:\wamp\www\mr\01\99Pursey\release.php on line 3
以下是页面,不理解什么意思
顺便问下,大家开发PHP都用什么工具
index.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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="release.php">
<input type="text" name="userName" id="userName" /><br />
<input type="password" name="passWord" id="passWord" /> <br />
<input type="submit" name="btn1" value="提交" />
</form>
</body>
</html>
release.php
<?php
include("conn/conn.php");
$userName=$_POST(userName);
$passWord=$_POST(passWord);
$sql=mysql_query("insert into tb_users(userName,passWord)values('$userName','$passWord')");
if($sql)
{
echo ("<script>alert('保存成功');window.location.harf='index.php';</script>");
}
else
{
echo ("<script>alert('保存失败');history.back();</script>");
}
?>
conn.php
<?php
$conn=mysql_connect("localhost","root","")or die("数据库服务连接错误".mysql_error());
mysql_select_db("db_Pursey",$conn)or die("数据库连接错误".mysql_error());
mysql_query("set names gb2312");
?>
错误为:Fatal error: Function name must be a string in D:\wamp\www\mr\01\99Pursey\release.php on line 3
以下是页面,不理解什么意思
顺便问下,大家开发PHP都用什么工具
index.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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="release.php">
<input type="text" name="userName" id="userName" /><br />
<input type="password" name="passWord" id="passWord" /> <br />
<input type="submit" name="btn1" value="提交" />
</form>
</body>
</html>
release.php
<?php
include("conn/conn.php");
$userName=$_POST(userName);
$passWord=$_POST(passWord);
$sql=mysql_query("insert into tb_users(userName,passWord)values('$userName','$passWord')");
if($sql)
{
echo ("<script>alert('保存成功');window.location.harf='index.php';</script>");
}
else
{
echo ("<script>alert('保存失败');history.back();</script>");
}
?>
conn.php
<?php
$conn=mysql_connect("localhost","root","")or die("数据库服务连接错误".mysql_error());
mysql_select_db("db_Pursey",$conn)or die("数据库连接错误".mysql_error());
mysql_query("set names gb2312");
?>
...全文
相关推荐
Java新手练手的小项目
在Java编程领域,新手往往需要通过实践来提升技能和理解力。"Java新手练手的小项目"是一个理想的起点,它提供了丰富的练习机会,帮助初学者巩固基础,掌握核心概念,并逐步提升到更高级的编程技巧。
unity3D 新手引导遮罩,支持圆形和矩形框
使用这些资源,开发者可以按照上述方法构建出自己的新手引导遮罩系统,从而提升游戏用户体验,尤其是对于首次接触游戏的新手玩家来说,能够更快速地融入游戏世界。
一款简洁的新手引导控件
标签中提到的"jquery js"表明这个新手引导控件是基于JavaScript库jQuery构建的。
新手引导页面实现
本篇将详细讲解如何实现一个新手引导页面,主要关注其设计原则、实现方式以及相关技术。一、设计原则1. **明确目标**:新手引导应清晰地告诉用户这个功能是用来做什么的,避免让用户猜测。2.
新手引导,引导页原码,新手指引
标题“新手引导,引导页原码,新手指引”暗示了这是一个关于创建新手教程或引导流程的项目。通常,新手引导由一系列交互式的页面或弹出窗口组成,它们通过一步步地指导用户完成关键操作,使用户能够快速上手。


基础编程
