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

07-19-2007, 03:15 PM

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

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

07-19-2007, 04: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.