putnamehere Posted April 8, 2006 Share Posted April 8, 2006 Hi, i'm makeing a comment script and i have a input box for the persons name or email.Problem is when the page is submited i need to know if it's a email or website so i use the mailto:// or http:// acordingly.How would i do this? Link to comment https://forums.phpfreaks.com/topic/6886-comment-script/ Share on other sites More sharing options...
Barand Posted April 8, 2006 Share Posted April 8, 2006 Look for an '@'[code]if (strpos($_POST['fieldname'], '@') !== false) { // email}else { // web site}[/code] Link to comment https://forums.phpfreaks.com/topic/6886-comment-script/#findComment-25061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.