PHP检测表单提交 求找异常

WBOY
Release: 2016-06-13 13:45:16
Original
854 people have browsed it

PHP检测表单提交 求找错误
if($_post["submit"])
{
include 'config.php';
$con = mysql_connect("$db_host","$db_username","$db_password") or die ('MYSQL数据库链接失败');
mysql_select_db($db_name,$con);
mysql_query("set names utf8;"); 
$p=$_post['p'];
$p=(int)$p;
$linkurl=$_POST['linkurl'];
$linkdes=$_POST['linkdes'];
$linkname=$_POST['linkname'];
$linkpic=$_post['$linkpic'];
mysql_query("INSERT INTO links values ('$p','$linkname','$linkurl','$linkpic','$linkdes')");
echo "OK!";
mysql_close($con);}

else 
echo "false";






 


 
 


 


   
  0为有,1为无


 


 
 


 


 
  描述只有LOGO链接填写


 


 
 
 





哪里错了啊!

------解决方案--------------------
第一行就错了

if($_post["submit"])

修改成

if($_POST["submit"])

还有$linkpic=$_post['$linkpic'];

一样修改 $_POST

其他的就没看了看看正常没了吧
------解决方案--------------------
$_POST 的大小写要注意下。。
------解决方案--------------------
$_POST 的大小
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!