Jump to content

strstr or something


slimjim

Recommended Posts

I am using this:


$url = (strstr($_POST["websiteurl"],"http://")!=""?"":"http://").$_POST["websiteurl"];

 

Only problem is that it not working correctly the way I need it too.

Oh it replaces the http:// if not there, but if a person forgets the :// or just the //, it adds the http:// to it anyway so I could end up with http://http:

 

I need help on this so in end result, of regardless of what they missed i has http"//

 

PLease help

Link to comment
https://forums.phpfreaks.com/topic/62871-strstr-or-something/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.