php code to upload a url correctly
| From: | RW3) CM&MC Manchester | Date: | Fri, 26 Jan 2007 14:10:03 +0000 |
| Subject: | php code to upload a url correctly | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-247823@lists.php.net to get a copy of this message | ||
I have a form in which users submit a url. I am having problems as some
people submit the url in the format http://www.blah.blah.org
<http://www.blah.blah.org/> while others submit in
the format
www.blah.blah.org <http://www.blah.blah.org/> I have
designed the form
so that it seems fairly obvious (to me anyway) not to include the
http:// but people are still doing it (presumably because they are
copying and pasting from a browser). My form processing script is
designed to add http:// to the submitted url and place the modified url
in a database for future use. As you can imagine sometimes I end up with
urls such as http://http://www.blah.blah.org
<http://http:/www.blah.blah.org> in my database.
Hence I need a more
rigorous form processing script that is capable of first checking if the
url includes http:// and then processes accordingly. Can anyone point me
in the right direction for such a script?
Thanks
Dr James Corden
Technology Evaluation Manager
TrusTECH, Innovation Unit
1st Floor Postgraduate Centre
Manchester Royal Infirmary
Oxford Road
Manchester
M13 9WL
Tel: 0161 276 5782
Fax: 0161 276 5766
E-mail: james.corden@cmmc.nhs.uk
Web: http://www.trustech.org.uk
This email and any files transmitted with it are confidential and solely
for the use of the intended recipient. It may contain material protected
by law as a legally privileged document and copyright work. Its content
should not be disclosed and it should not be given or copied to anyone
other than the person(s) named or referenced above. If you are not the
intended recipient or the person responsible for delivering to the
intended recipient, be advised that you have received this email in
error and that any use is strictly prohibited.
If you have received this email in error please notify sender
immediately on +44 (0161) 276 5782