Hi,
lol - not exactly the most well formed code I have to admit.
and as for the Hutton, I have better things to worry about than him... like my old dear for a start ;)
...
names - should be the same for sure.
The cookie set to -1h should really be '0' or nothing '' to end the session when the all browser instances are closed.
once the cookie has been set with the first value and redirected to the desire id=....?added it should display the new link in a section of the site with a add remove text link next to any and all.
The way I was think but need to ask if its right to do this...
The only reason the user should call this script is to add and delete links. the actual printing of values will be embedded into the section of the page and will read the cookie from there. The reason for this is that some pages are static and some are dynamic, this script hopefully will just serve as the mechanism. To be honest I haven't got to that bit.
The only thing the script should really do is update the cookie with the users values and like you said trim/limit them to a total of five values. there doesn't really have to be any user msg for when they reach the maxiumum of 5 links, I'll think about that later when I learn a bit more about PERL.
Hope that anwsers some of the stuff anyway. so the routines should include what you mentioned.
Add
1. clock the named cookie and set a new one if need. Add the values(s) and limit to 5.
Remove
2. grab the name of the cookie and delete the selected value. and update the number of values.
Seems you got me thinking now could I stick another value in the cookie that would hold the value count... a ha.. something like count .. that starts at 0 and goes to total 5. That would help the front end code know how many links are there and respond correctly hey!?
peace, mat
|