Sanitize the post variable with filter_var()
.
Example here. Like:
echo filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
More Related Contents:
- PHP Errors – Total of four [closed]
- how to send birthday mail from website without opening website [closed]
- What are the best practices for avoiding xss attacks in a PHP site [closed]
- When should I use prepared statements?
- “Keep Me Logged In” – the best approach
- How safe are PHP session variables?
- Generating a random password in php
- Converting HTML to plain text in PHP for e-mail
- Preventing session hijacking
- Why is using a mysql prepared statement more secure than using the common escape functions?
- PHPMailer GoDaddy Server SMTP Connection Refused
- Sendmail Wamp Php
- SMTP Connect() failed. Message was not sent.Mailer error: SMTP Connect() failed
- How can I relax PHP’s open_basedir restriction?
- How to setup mail in XAMPP locally?
- smtp configuration for php mail
- PHP Email sending BCC
- How to run PHP exec() as root?
- Hiding true database object ID in url’s
- How to send emails via cron job usng PHP mysql
- CodeIgniter – why use xss_clean
- In PHP, how do I extract multiple e-mail addresses from a block of text and put them into an array?
- Sending email from localhost
- Why shouldn’t I use PHP’s mail() function?
- Codeigniter CSRF – how does it work
- Is there a limit when using php mail function?
- Validate Email in php [duplicate]
- How to block Disposable Email Addresses in your website’s registration form? [closed]
- Safe alternatives to PHP Globals (Good Coding Practices)
- Single Session Login in Laravel