Forums

This topic is locked

adapting check username behaviour

Posted 06 Jul 2004 12:36:55
1
has voted
06 Jul 2004 12:36:55 Dave Clarke posted:
hi

I know that I can use the check new username behaviour to check entries to other fields for duplicates but i'm trying to check for parts of entries being duplicated, for example someone tries to enter www.domain.com/index.htm but in my database i already have www.domain.com, i need to prevent this url from being added, also the other way round. .. long url already in and someone tries to add short one.

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Replies

Replied 06 Jul 2004 21:00:49
06 Jul 2004 21:00:49 Kent Steelman replied:
I use a form validation tool to solve this problem and only allow a specific format to enter the database field. example www.yourname.com is the only format allowed. If the user tried any other format, then an error message is returned to the user and re-enforcing the specific format needed. This with the check name server behavior should solve the issue.

Kent

Wm. Kent Steelman
Replied 07 Jul 2004 13:14:11
07 Jul 2004 13:14:11 Dave Clarke replied:
hi Kent

yes, i could do that but sometimes the long url is required, some people have different websites within the same domain for example this url is where i want to link to www.wingscc.com/aps/Default.htm but this one (with just the domain) gives an entirely different result www.wingscc.com

maybe some hand coding required to check the form field against the database?

<b>If request("field" LIKE '%(rsetbreeders.Fields.Item("url".Value)%' or (rsetbreeders.Fields.Item("url".Value) LIKE '%request("field"%' </b>then redirect to already exists page???

would summat of that nature work?



ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Edited by - Davecl on 07 Jul 2004 13:14:41
Replied 07 Jul 2004 13:27:50
07 Jul 2004 13:27:50 Kent Steelman replied:
Ok then another possible solution. Make a one to many relationship with one table containing user name and the base url (e.g., www.yourname.com and another table where the secondary location is kept. (e.g., index.html etc.) when needed you can concatinate the two and when you dont your can use the check name.

Wm. Kent Steelman

Reply to this topic