Gossamer Forum
Home : Products : DBMan : Discussions :

Calling date in the URL?

Quote Reply
Calling date in the URL?
I want to add a link at the html_footer with the variable current date;

The currently the code is............

print
qq!| <A HREF="$db_script_link_url">Home</A> !;
print
qq!| <A HREF="$db_script_link_url&add_form=1">Add NOt</A> !

and so on.......

---------------------------------------

Now I want to add another link with it which is given below:

print qq!| <A

HREF="$db_script_link_url&view_records=View+Records

&date=$rec{'date'}">Show All the records posted today!</A>

But it's not extracting the $rec{'date'} from records.

----------------------------------

Any help would be apprciated.

Zeshan.


Quote Reply
Re: [zeshan] Calling date in the URL? In reply to
you can't use the rec function since there is no record to currently in memory

try the following in html.pl:

Code:
sub html_footer {
# --------------------------------------------------------
# Print the menu and the footer and logo. It would be nice if you left
# the logo in. ;)
#
# We only print options that the user have permissions for.
#
my $isToday= &get_date;
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2'; print qq!<P align=center><$font>!;
print qq!| <A HREF="$db_script_link_url">Home</A> !;
print qq!| <A HREF="$db_script_link_url&add_form=1">Add</A> ! if ($per_add);
print qq!| <A HREF="$db_script_link_url&view_search=1">View</A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&delete_search=1">Delete</A> ! if ($per_del);
print qq!| <A HREF="$db_script_link_url&modify_search=1">Modify</A> ! if ($per_mod);
print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*">ListaAll</A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&admin_display=1">Admin</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A>!;
print qq!| <A HREF="$db_script_link_url&Date=$isToday&keyword=&sb=---&so=ascend&mh=10&view_records=View+Records">New Today</A>! if ($per_view);
print qq!</font></p>!;


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."