...

View Full Version : Problem replacing http:// in a URL in a string.



erekosa
07-19-2007, 02:15 PM
Guys,

I've come across a problem where I wanted to be able to copy into a form a URL. But before I store it in a database I wanted to remove the 'http://' part of the string.


$_POST['Website'] = str_ireplace('http://','',$_POST['Website']);

This freezes the entire page. I don't know why this happens or if there is some process I need to do first to get this to work.

Any help appreciated :D

Fumigator
07-19-2007, 02:42 PM
Weird... that should (and does) work fine...

erekosa
07-19-2007, 03:34 PM
Many thanks, I've fixed it.

I'm not sure what it was but it honestly was not working. I've also simplified by coding so it was a little easier to follow.

Please close this thread.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum