点击提交后调到guanli_ok.php 但是那边空白一片 也不会提示修改成功或者失败 是什么原因啊。。求解决方案">
当前位置:Gxlcms > PHP教程 > php修改数据库出现问题

php修改数据库出现问题

时间:2021-07-01 10:21:17 帮助过:15人阅读

  

这个是guanli_ok.php
输出更新成功提示	}	else{		echo "";		//
输出更新失败提示 }}?>
点击提交后调到guanli_ok.php 但是那边空白一片 也不会提示修改成功或者失败 是什么原因啊。。求解决方案


回复讨论(解决方案)

SQL 串写错了
$insert=mysql_query("update tb_book set pwd='$xpwd',section='$section',name='$section' where id='$user' AND pwd='pwd'",$conn);

改了之后还是没反应,,,

SQL 串写错了
$insert=mysql_query("update tb_book set pwd='$xpwd',section='$section',name='$section' where id='$user' AND pwd='pwd'",$conn);

还是没反应啊。。

请你打开 php 的错误显示功能

请你打开 php 的错误显示功能

开启了 但是还是空白一片


if(isset($_POST['Submit']) and $_POST['Submit']=="提交"){ 不用解释了吧。。。


if(isset($_POST['Submit']) and $_POST['Submit']=="提交"){ 不用解释了吧。。。

已改 但是还是空白。,。



if(isset($_POST['Submit']) and $_POST['Submit']=="提交"){ 不用解释了吧。。。

已改 但是还是空白。,。


你没进if

if(isset($_POST['xiugai']) and $_POST['Submit']=="确认修改"){

          

if(isset($_POST['Submit']) and $_POST['Submit']=="提交"){ 不用解释了吧。。。

已改 但是还是空白。,。

你没进if if(isset($_POST['xiugai']) and $_POST['xiugai']=="确认修改"){

...

php.ini 中
display_errors = On
重启 web 服务器

你的错误实际产生于 conn/conn.php

如果你的错误显示是打开的话
$insert=mysql_query("update tb_book set pwd='$xpwd',section='$section',name='$section' where id='$user' pwd='pwd'",$conn); //执行更新操作
echo mysql_error(); //这里一定是有输出的,因为 sql 指令错了

conn



错误

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/30/15 13:38:48
Apache/2.2.9 (APMServ) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/30/15 13:38:48
Apache/2.2.9 (APMServ) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6




你开始说是guanli_ok.php 你截图是guanl_ok.php


Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/30/15 13:38:48
Apache/2.2.9 (APMServ) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6




你开始说是guanli_ok.php 你截图是guanl_ok.php

我改了 打开发现是空白的。。


Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/30/15 13:38:48
Apache/2.2.9 (APMServ) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6




你开始说是guanli_ok.php 你截图是guanl_ok.php

没有错误提示

php.ini 中
display_errors = On
重启 web 服务器

你的错误实际产生于 conn/conn.php

如果你的错误显示是打开的话
$insert=mysql_query("update tb_book set pwd='$xpwd',section='$section',name='$section' where id='$user' pwd='pwd'",$conn); //执行更新操作
echo mysql_error(); //这里一定是有输出的,因为 sql 指令错了

是我conn错了吗?

print_r($_POST); 就能发现是个空数组,怎么都不可能进入if里面。肯定为空了。

把你的form 定义改一改。
给 每个元素加上name 属性。


submit 也是一样,value改成value="提交"


改成


应该就能进入if分支了



Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/30/15 13:38:48
Apache/2.2.9 (APMServ) mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6




你开始说是guanli_ok.php 你截图是guanl_ok.php

没有错误提示



你打开一个不存在的页面 当然是报404了。。。

人气教程排行