Im a little stuck,
Ive made a program that lets a user submit a url for displaying in there own personal menu..
now the problem is not everyone will submit a complete url. IE the [url]http://[/url] will be missing.. this causes the link to not work on my domain. if a user submits www.sagez.co.uk the outputted link once its been to the database and back will look like this http://www.sagez.co.uk/www.sagez.co.uk now if a user submits a complete url wiuth the [url]http://[/url] in front then everything is fine.
I made a function that checks for missing [url]http://[/url] and adds it if nessacery, but this is no good for [url]https://[/url] or [url]ftp://[/url] ect.
i dont want to make 3 diffrent functions just for checking a url is complete, and i dont want to ask the user for more information, just type a url in and go.
There will be some built in php function that checks a string for certain chacacters and then adds some if they are missing.
Sorry ive got nothing written to show you, im starting from scratch on this.
summary:
submitted string is www.sagez.co.uk
i want it to be http://www.sagez.co.uk