Quote:
But the bit about $values[5] doesn't :-( I can't figure out how to call this in the mailroutine.
The purpose of the require statements is to allow you to call the subroutines in db_utils.pl. One of those subroutines is
sub get_record which returns an array of the record fields. This array is @values, based on the call I suggested:
Quote:
@values = &get_record($fields{'ID'});
Now, each field is accessible by indexing @values, starting at 0. When accessing the array, you use $values (instead of @values) and specify an index number. The description is the 6th field of a link record, but since the indexing starts at 0 (which is the ID field itself), we use the number 5 for our index to get the description. Thus,
$values[5] is used to access the description. You could write something like:
Quote:
$link_title = $values[$db_title];
$link_url = $values[$db_url];
$link_desc = $values[5];
after the call to sub get_record.
You could then use $link_title and $link_url instead of $fields{'rec_title'} and $fields{'rec_url'} and could use $link_desc as well. I hope this is clearer now.
Quote:
Also, I can't figure wther I need to do something in the site_html template?
I'll work on an updated version of this mod in a bit and let you know when it is done. That would be easier than trying to explain it all here. Hopefully it will be done today but, if not, certainly by tomorrow.
[This message has been edited by Bobsie (edited May 08, 1999).]