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

Modify.cgi Problem with duplicate url's

Quote Reply
Modify.cgi Problem with duplicate url's
I have a number of duplicate url's in my database (this is out of necessity - I have to have them - I run an affiliate programs directory and some of the url's for different programs point to the same url).

The problem I have discovered with this version of links, because it relies on the url to determine the record to update, is that with one modification submitted all duplicate url's could be overwritten in one foul swoop.

I believe the best way around it is to use the 'ID' No. as the test on modify.html not the url no.

I tried changing the fields on the modify.html template to incorporate the ID field however this doesn't work.

This problem is obviously causing major headaches for me as I am now having to manually update each modification - they are all being submitted by formail at this time.

Any help would be greatly appreciated.

Regards,



------------------
Clint
----------------------------------
www.AffiliatesDirectory.com
Proud Supporter of Links SQL
----------------------------------






[This message has been edited by Clint (edited March 23, 2000).]
Quote Reply
Re: Modify.cgi Problem with duplicate url's In reply to
I've had problems in the past getting the modify.cgi altered to my needs.

What you want to do, in your case, is to have the modify form be written with the ID number from the Links database table.

When the person submits the form for "modify" you want to have that assigned to the field "LinkID" ---

Something like:

<input type="hidden" name="LinkID" value="<%ID%>">

When you write the information to the Validate table, you need to make sure you use the LinkID field that was passed to the template.

Then when you "validate" the link, you need to make sure the "UPDATE" criteria is the value that is in the "LinkID" field.
"Where ID=$in->param('LinkID')"

Or the value that is in Validate.LinkID table field for the current record.

Again..... this is the *IDEA* of how to do it, the actual implementation is left to the reader Smile

But what you want to do is pass the "ID" from the Links.ID field to the form, and have it stored as a "hidden" field with the name/value "LinkID"/<%ID%>, where LinkID is the Validate Table's place for storing the value of ID which is the Link.ID field.



Quote Reply
Re: Modify.cgi Problem with duplicate url's In reply to
Pugdog:

Thanks for your reply. I get the 'general drift' but am a bit short on implementation skills :-)

I see that Widgetz has been doing some work on something similar to what I am after by using the inbuilt Registration system of Links. That type of thing would solve all of my problems ... but it appears as though Widgetz has dropped off the planet - then again he does do a lot of work for people and deserves a break.

Again, thanks for your help - I'll keep plugging away at seeing how I can solve this problem.

Regards,

Clint.