Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem replacing http:// in a URL in a string.

    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.

    PHP Code:
    $_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

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Weird... that should (and does) work fine...

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •