Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Error Template If Duplicate Link?

Quote Reply
Error Template If Duplicate Link?
When people submit links, is it possible to have the script check the DB for the URL and then spit out an error page if it is a duplicate, from an add_duplicate_error.html template or something?

Thanks.

Quote Reply
Re: Error Template If Duplicate Link? In reply to
You can modify the script to do a SELECT FROM Links _and_ a SELECT from Validate (remember, the link could already be added, waiting for validation).

You would pass in the url, and see if you had a match.

You might want to do a partial select on the domain name, to see if a partial match is there -- such as '/' or a '/index.html' etc.

But, the short answer is "yes" it can be done.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Error Template If Duplicate Link? In reply to
Thanks Pugdog.

Can you point me to any specific coding that I would need to edit within my current files?