![]() |
|
#1
|
|||
|
|||
How to strip http:// from a form entryHello,
I have a form that I use to allow users to enter webcams to the database on my website. I want to be able to strip out the 'http://' from the web address entered. Can anyone help me. Thanks, Richard http://thewebcamsite.net |
|
#2
|
||||
|
||||
Re: How to strip http:// (scheme) from a form entryThe SIMPLEST method would be to use str_replace() on the string, but that would be reckless.
You also want to consider secure urls with https://. A function that can work with all the protocols will be a wiser choice, maybe something like this: PHP Code:
Example code above not tested extensively. |
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML Form to PHP File - Help Requested | vigilantweather | MySQL / PHP Forum | 15 | 07-Aug-2006 19:22 |
| Binary Search Tree | penance | C Programming Language | 2 | 07-Aug-2005 04:37 |
| PHP form needs validation | jabesign | MySQL / PHP Forum | 16 | 05-Jan-2005 00:23 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 03:38 |
| help with form | orbitel | MySQL / PHP Forum | 11 | 21-Jan-2004 15:29 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The