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? Quote 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] Quote Link to comment https://forums.phpfreaks.com/topic/6886-comment-script/#findComment-25061 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.