another protocol like ftp. ("^(https?|ftp)://")
function checkurl(input){
if(NOT REFindNoCase("^https?://",input))
input = "http://" & input;
return input;
}
Form.myURL = checkurl(Form.myURL);
Do that before inserting in the database. No need for validation, just
assume the user typed the url without the protocol.
Pascal
> -----Original Message-----
> From: Deanna Schneider [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 20 januari 2004 21:28
> To: CF-Talk
> Subject: Storing URL's
>
> Hey all,
> So, I'm sure we've all dealt with storing URL's that users
> can enter. And, no matter how much you say, "Start the url
> with http://" or "start the URL with www" someone will do it
> the opposite way.
>
> So, the question is - do you check the format of the url on
> the insert and clean them so they're all the same? Or, do you
> do it on the output? Either way, are you just checking for
> the existence of http://, or are you doing something else
> super fantabulistic with regex or something that I'm not thinking of?
>
> -d
>
>
>
>
> --
> Deanna Schneider
> UWEX-Cooperative Extension
> Interactive Media Developer
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

