Jump to content

preg_match php help!


drmota

Recommended Posts

Hey guys,

 

In my contact form i have the action: preg_match but i've come accross a problem.

 

Problem: Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\Program Files (x86)\wamp\www\ts\contact.php on line 34

 

Code:

$error_message = "";
$email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
  if(!preg_match($email_exp,$email_from)) {
  	$error_message .= 'The Email Address you entered does not appear to be valid.<br />';

 

 

Thanks in advance :)

Link to comment
https://forums.phpfreaks.com/topic/224519-preg_match-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.