Hi,
I had to rewrite it a bit - seems there were a couple of errors I didn't spot in my original global <G>
Code:
sub {
my $tbl = $DB->table('Links');
$tbl->select_options('ORDER BY ID DESC','LIMIT 1');
print $IN->header();
print qq| LinkOwner => $USER->{Username}|;
if ($tbl->count( { LinkOwner => $USER->{Username} } ) > 0) {
my $link = $tbl->select( { LinkOwner => $USER->{Username} } )->fetchrow_hashref;
my $newlink;
map {
$newlink->{"Existing_".$_} = $link->{$_};
} keys %$link;
return $newlink;
}
}
...and call with the same way - i.e <%Existing_Title%>
BTW, you only need to call <%existing_fields%> tag once =)
i.e:
Code:
<%existing_fields%>
<input type="text" name="Title" value="<%if Title%><%escape_html Title%><%else%><%Existing_Title%><%endif%>" size="50">
<input type="text" name="URL" value="<%if URL%><%escape_html URL%><%else%><%Existing_URL%><%endif%>" size="50">
That definatly works - as I just tested it on one of my own sites
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work! Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500) Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins! Compare our different Plugin packages *new* Free CSS Templates