表单提交到白页? [英] Form Submits to white page?
问题描述
<但是,当表单提交并且用户填写了所有数据,并且没有错误时,表单会进入白页。我查看了源代码,显示的只是页面顶部的javascript,但看起来没有PHP / HTML正在执行。发生了什么?!
- 编辑 -
好的,所以我把错误转移了, '/'>
注意:使用未定义的常量用户名 - 在/ home / content / 04中使用'username' /7195304/html/header.php on line 54
将此添加到表单脚本的顶部:
ini_set('display_errors','On'); //有时需要重写时关闭
error_reporting(E_ALL);
因此,您可以查看提交表单时发生的错误。
So I have a form for my register system. When the form submits and there's errors, (like 'Enter a username first!' or 'You must provide a password!') it successfully refreshes the page and shows those errors.
HOWEVER, when the form submits and the user has filled out all of the data, and there is NO errors, the form goes to a white page. I looked in the source, and all that shows is the javascript at the top of my page, but it looks like no PHP/HTML is being executed. What is happening?!
-- EDIT --
Okay, so I turned errors on, and I'm getting stuff like this:
Notice: Use of undefined constant username - assumed 'username' in /home/content/04/7195304/html/header.php on line 54
Add this to the top of the form script:
ini_set('display_errors', 'On'); // sometimes it's needed when overridden to Off
error_reporting(E_ALL);
So you can see what the error was when you submitted the form.
这篇关于表单提交到白页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!