JoeyResnik Posted February 9, 2011 Share Posted February 9, 2011 getting Parse error: syntax error, unexpected $end in /home6/littleu7/public_html/admin/includes/functions/validations.php on line 73 oh, to anyone who's looking to help: <?php /* $Id: validations.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ //////////////////////////////////////////////////////////////////////////////////////////////// // // Function : tep_validate_email // // Arguments : email email address to be checked // // Return : true - valid email address // false - invalid email address // // Description : function for validating email address that conforms to RFC 822 specs // // This function will first attempt to validate the Email address using the filter // extension for performance. If this extension is not available it will // fall back to a regex based validator which doesn't validate all RFC822 // addresses but catches 99.9% of them. The regex is based on the code found at // http://www.regular-expressions.info/email.html // // Optional validation for validating the domain name is also valid is supplied // and can be enabled using the administration tool. // // Sample Valid Addresses: // // [email protected] // [email protected] // [email protected] // [email protected] // // Invalid Addresses: // // first [email protected] // // first@[email protected] // //////////////////////////////////////////////////////////////////////////////////////////////// function tep_validate_email($email) { $email = trim($email); if (strlen($email) > 255) { $valid_address = false; } elseif (function_exists('filter_var') && defined('FILTER_VALIDATE_EMAIL')) { $valid_address = (bool)filter_var($email, FILTER_VALIDATE_EMAIL); } else { if ( substr_count( $email, '@' ) > 1 ) { $valid_address = false; if ( preg_match("/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i", $email)) { $valid_address = true; } else { $valid_address = false; } } if ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') { $domain = explode('@', $email); if (!checkdnsrr($domain[1], "MX") && !checkdnsrr($domain[1], "A")) { $valid_address = false; } } return $valid_address; } ?> Link to comment Share on other sites More sharing options...
burt Posted February 9, 2011 Share Posted February 9, 2011 if ( substr_count( $email, '@' ) > 1 ) { $valid_address = false; } Link to comment Share on other sites More sharing options...
JoeyResnik Posted February 9, 2011 Author Share Posted February 9, 2011 done and done! working now THIS issue after I log in Fatal error: Call to undefined function tep_get_ip_address() in /home6/littleu7/public_html/includes/modules/action_recorder/ar_admin_login.php on line 33 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.