faces3 Posted April 1, 2013 Share Posted April 1, 2013 I found good mailinglist php script. But there been lot of errors. I fix all errors, but one error is more. Invalid syntax if someone add email and subscribe. Website can see: http://kalliteam.com/ccmail/contact.php And here is that original script: http://www.cicoandcico.com/ Quote Link to comment https://forums.phpfreaks.com/topic/276387-help-please-with-ccmail-error/ Share on other sites More sharing options...
faces3 Posted April 1, 2013 Author Share Posted April 1, 2013 { $regexp = "^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$"; if (preg_match('/$regexp/i', '$email')) return true; else return false; } What is wrong here?!? Quote Link to comment https://forums.phpfreaks.com/topic/276387-help-please-with-ccmail-error/#findComment-1422300 Share on other sites More sharing options...
faces3 Posted April 1, 2013 Author Share Posted April 1, 2013 if (preg_match("/^[0-9]+$/i", $applied_settings['max_displayed_recipients']) && preg_match("/^[0-9]+$/i", $applied_settings['pause_for']) && preg_match("/^[0-9]+$/i", $applied_settings['pause_every'])) and here what is wrong?!? Quote Link to comment https://forums.phpfreaks.com/topic/276387-help-please-with-ccmail-error/#findComment-1422301 Share on other sites More sharing options...
Solution jazzman1 Posted April 1, 2013 Solution Share Posted April 1, 2013 Try, $email = 'jazzman@gmail.com'; $regexp = "/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/i"; if (preg_match($regexp, $email)) return true; else return false; Quote Link to comment https://forums.phpfreaks.com/topic/276387-help-please-with-ccmail-error/#findComment-1422304 Share on other sites More sharing options...
faces3 Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) Awsome!!! It work. Thank you very much! Edited April 1, 2013 by faces3 Quote Link to comment https://forums.phpfreaks.com/topic/276387-help-please-with-ccmail-error/#findComment-1422311 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.