That code looks completely mangled. Try:
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
header("Location: ../signup.php?error=invalidmail&uid=" . $username);
exit();
}
Count up the if
and else
and make sure they surround the code correctly. Although you can skip the {}
when using a single line of code, it’s good practice to always add them in, so you can avoid messy, error prone code like this.
if($value = 10) {
// Your code
} else {
// Something else
}
Finally, this isn’t anything to do with WordPress.
Related Posts:
- ‘Password field is empty’ error when using autofill in Chrome
- Integrate recaptcha and wp_signon – what is needed?
- Receiving “This content cannot be displayed in a frame” error on login page
- Warning: Cannot modify header information – headers already sent
- wp-admin seems to be redirecting
- Can’t Login to WordPress, No Data Received Error
- Customizing login error messages
- screwed-up my blog..what should I do
- How can I find the login page? It was lost after moving the site
- Show errors on custom login form [duplicate]
- Why would the login page reload indefinitely?
- WordPress error on log out ‘Not Permitted’ and can’t log out
- Creating custom login errors
- Why is wp-login trying to send an email?
- Can not login to wordpress site after resolving white screen of death
- I can’t access my WordPress dashboard – shows Warning message [closed]
- Access log “POST /wp-login.php HTTP/1.0” 400
- ERROR: Cookies are blocked due to unexpected output (no FTP access)
- Login error ” There has been a critical error on this website”
- Unable to login my wordpress website
- Help! ERROR: Cookies are blocked due to unexpected output on attempting to login to resolve an issue with my site
- Can’t login to wordpress, got ERR_EMPTY_RESPONSE after a few minutes
- ERROR: Cookies are blocked due to unexpected output – ultimate solution
- Login screen keeps resetting?
- How to place wp-login.php in page or page template?
- Member Area Login with Fail Message
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- SSO / authentication integration with external ‘directory service’
- Preventing session timeout
- Check for correct username on custom login form
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- How to disable autocomplete on the wp-login.php page
- how to display the wordpress login and register forms on a page?
- How can I add a custom script to footer of login page?
- Is it alright for two people to simultaneously be logged into a WP site as administrator?
- How do I turn off the ability to login?
- Give visitor access to password protected page/post via external script
- WordPress Login Footer URL
- moving server can not login
- Save last login date in global before change it?
- How to get login data (session) outside WordPress?
- password protect individual pages
- Change register form action url
- Is back-end access not required for an app to post to my blog?
- Store brute-force IP addresses
- How do I make my site publicly viewable? Everything redirects to wp-admin
- How to create a private login page for admin.?
- WordPress Security – How to block alternative WordPress access
- Protecting WordPress login page
- Different homepage for logged in users
- reset password link redirect to login page
- How to include error message on login
- Deregister default wp-admin css on login screen only?
- How to fix blocked cookies error that doesn’t let me log into wp-admin?
- SSO to WP, from a non-wp site on a different domain and server
- How can I login as admin after redirect to custom login page
- Login with serialized password
- is_user_logged_in() not working in Firefox
- Set Default User Role
- Lock out all WordPress Administrators except two specific users
- Removing wordpress cookie from non-wordpress site
- Replacing default display name to login name
- Why does is_user_logged_in() return false after I change user password on the front end?
- How to generate “WP_Error” Object for user login?
- ?login=failed only attached to URL under certain circumstances
- WordPress not logged in locally with correct username and password
- my wp-login page doesn’t load [closed]
- Requiring login for specific pages
- login trouble WordPress can change IDs created by hoster site
- login/logout for only one page
- WordPress registration page template
- Removing “public” user registration without completely turning it off?
- Custom login modal page action
- Require re-login when logged-in user attempts to access restricted page
- Disable registration on certain condition
- Temporally disable password to login with empty password?
- Login error when username as email different to primary email
- How do you implement a login feature on a WordPress site?
- How to log into WordPress admin in MAMP
- Can’t login with any account – No error message shown
- wp login password reset
- Cookies error during first time login attempt
- Hide login page and use wp_login_form on ordinary pages
- How can I customize the content of the login page?
- WordPress giving error when I log in after trying emergency.php
- Some crawlers/bots attempting to login with very good guesses. How?
- Create custom field for users to check if they agreed to terms
- WordPress logs out on protocol switch
- Showing A Menu When Only Users Are Logged In [duplicate]
- wp_logout logging everyone out instead of just the user that clicked the logout link!
- Why doesn’t the “Remember Me” checkbox work for me on a live website? Only works on a local server environment
- Secure login without SSL? [closed]
- Cant login, Password MUST be reset error, after reset
- Handle POST request sent from an external site for login?
- Unable to login after adding ReCaptacha without API key
- How to create an alternative login page that does not use any plugins?
- issue with my wp site after login
- How can I automatically change directory on ssh login?
- How to create a fully functional user registration in WordPress?
- How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?