You can use filter_var
to validate the e-mail address:
if (!filter_var($address, FILTER_VALIDATE_EMAIL)) {
// invalid e-mail address
}
More Related Contents:
- Pagination data
- The requested URL was not found on this server.
- Grabbing the href attribute of an A element
- How do I close a connection early?
- How to create a secure mysql prepared statement in php?
- How can I send a Firebase Cloud Messaging notification without use the Firebase Console?
- Passing JavaScript array to PHP through jQuery $.ajax
- Can HTML be embedded inside PHP “if” statement?
- PHP convert string to hex and hex to string
- Strange behavior of foreach when using reference: foreach ($a as &$v) { … }
- Send post request using Volley and receive in PHP
- Laravel – htmlspecialchars() expects parameter 1 to be string, object given
- How to install pdo driver in php docker image?
- PHP: Read Specific Line From File
- MySQL retrieve variable from Stored Procedure in PHP PDO
- Can’t insert Chinese character into MySQL
- Check to see if a string is serialized?
- How to use composer packages in codeigniter?
- Send data from android to server via JSON
- Auth::user() returns null
- Is htmlspecialchars enough to prevent an SQL injection on a variable enclosed in single quotes?
- How to add a new method to a php object on the fly?
- How to SELECT DEFAULT value of a field
- Laravel SQLSTATE[HY000] [2002] Connection refused
- Flat PHP Array to Hierarchy Tree
- Selecting all fields except only one field in mysql [duplicate]
- Browser displays � instead of ´
- How do I retrieve the visitor’s ISP through PHP?
- How to insert into MySQL using mysqli
- How can I create custom SEO-friendly URLs in OpenCart?