cian
Technical User
- Oct 11, 2001
- 1,383
Hi guys,
i'm starting work on a new script, I haven't started on the code yet because I want to figure out the strategy to take so I hope you can advise me.
basically it's like a book mark script.
I've desiged the look so that the links are listed with an icon in a 3 column table such as the following:
|icon|link|spacer|icon|link|spacer|icon|link|
|icon|link|spacer|icon|link|spacer|icon|link|
There are 2 problems I can't figure out.
1. how to add new links.
When a new link is added it needs to either add to an empty table cell in an existing row always if available or else create a new row and add the link to the first cell.
To make it worse i'm using flat files to store the data which I gues makes it more difficult.
I presume I can just store the data like:
|id number|icon name|link address|link title|...next 2 cells
what about the html code, is it easier to write this also to the flat file?
2. Editing/deleting links
When editing links I presume I just search the flatfile for the id number and display the information in form fields to be edited?
Same for deletions I just search for the id number?
Main question is how do I associate the id number with a particular link? When calling the data from the flat file do I just use a name or id attribute to identify the icon and link?
But then I need to re-organise the date back into 3 columns? I don't want to end up with a chess board look with
empty cells.
What do you think? Sorry for the hundred questions!
- É -
i'm starting work on a new script, I haven't started on the code yet because I want to figure out the strategy to take so I hope you can advise me.
basically it's like a book mark script.
I've desiged the look so that the links are listed with an icon in a 3 column table such as the following:
|icon|link|spacer|icon|link|spacer|icon|link|
|icon|link|spacer|icon|link|spacer|icon|link|
There are 2 problems I can't figure out.
1. how to add new links.
When a new link is added it needs to either add to an empty table cell in an existing row always if available or else create a new row and add the link to the first cell.
To make it worse i'm using flat files to store the data which I gues makes it more difficult.
I presume I can just store the data like:
|id number|icon name|link address|link title|...next 2 cells
what about the html code, is it easier to write this also to the flat file?
2. Editing/deleting links
When editing links I presume I just search the flatfile for the id number and display the information in form fields to be edited?
Same for deletions I just search for the id number?
Main question is how do I associate the id number with a particular link? When calling the data from the flat file do I just use a name or id attribute to identify the icon and link?
But then I need to re-organise the date back into 3 columns? I don't want to end up with a chess board look with
empty cells.
What do you think? Sorry for the hundred questions!
- É -