leeh14 Posted May 6, 2011 Share Posted May 6, 2011 Hi, Right when a form is submit the data in the form is added to the database basically I need to know how I can check one of the inputs to see if 'http://' has been add along with an URL, if it has not I need to add it in front of the string. How can this be done? Regards Lee Quote Link to comment https://forums.phpfreaks.com/topic/235716-remove-duplicated-content/ Share on other sites More sharing options...
incubi1 Posted May 6, 2011 Share Posted May 6, 2011 Check for it then add it if needed. $mystring = "http://dsfsdfdf"; $pos = strpos($mystring, "http://"); if ($pos === false) { print "Not there so add it"; } else print "Its there"; Quote Link to comment https://forums.phpfreaks.com/topic/235716-remove-duplicated-content/#findComment-1211560 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.