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
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!