Jump to content

Help with improving web Form email validation, etc.


Chrisj
 Share

Recommended Posts

I am using this a modal window(jBox) - with a web Form in it, that requires the Form (just Name & Email) to be completed and Submitted in order to close the modal window - allowing access to the main page.

The Form uses this corresponding ../submit.php which this:

if (empty($_POST['name'])|| empty($_POST['email'])){
$response['success'] = false;
} else {
$response['success'] = true;
}

echo json_encode($response);

where, upon Form > submit, successfully shows 'error' if the Form fields are not populated, and 'success' when the Form fields are populated/submitted.

I'd like the Form to require a proper/valid email address and avoid spam and header injection
(maybe honeypot protection and implement a form of rate limiting (a single ip may not send more than x messages per day)).

Any assistance/guidance is appreciated

 

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.