开发者

Form Submits to white page?

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.


An error is occurring partway through the page, and you have error reporting disabled. Enable it and/or check your error log.


This error means that you forget a '$' in front of the variable 'username'.

Hope this help


This is probably because you refer to some data as $_POST[username], instead of $_POST['username'], change that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜