简体   繁体   中英

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

可能是因为您将某些数据称为$ _POST [username],而不是$ _POST ['username']来进行更改。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM