Sunday, March 18, 2018 03:27 am EDT
Bri's picture

PHP Email Address Validation

Email address validation is a very common thing and it's pretty easy in php 5.2 or greater. You no longer need to use a regular expression. You can use this simple script below, making use of the filter_var function.

$email = '';
$validation = filter_var($email, FILTER_VALIDATE_EMAIL);

$output = 'proper email address';
$output = 'wrong email address';

echo $output;

Bri's picture

Changing the output of the $submitted variable using Drupal

As you might already know, you can pick which content types contain the $submitted by information that Drupal includes. If you are not already aware, you can go to admin/build/themes/settings/global and choose which content types you would like to have that information. As you add new content types, revisit this page to alter the settings.