izbryte Posted January 22, 2008 Share Posted January 22, 2008 Hi, I have a form with a textbox where users can enter their website. Even though I tell them the http:// is not needed they still enter it. (so it should be www.mysite.com or mysite.com) Can anyone help me remove the "http://" from the link if someone has entered it? Quote Link to comment https://forums.phpfreaks.com/topic/87152-remove-http-from-entered-text/ Share on other sites More sharing options...
Stooney Posted January 22, 2008 Share Posted January 22, 2008 $new_url=str_replace("http://", "", $url); Quote Link to comment https://forums.phpfreaks.com/topic/87152-remove-http-from-entered-text/#findComment-445753 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.