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 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"; Link to comment https://forums.phpfreaks.com/topic/235716-remove-duplicated-content/#findComment-1211560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.