Ah, Kylie, yes of course, your customers must be able to add records. The way have I have set the mod up the complete database is to be uploaded when it's time for a revision.
I think that if the customer leaves DBman (e.g. to go to
HOME) it is no point in passing the email address there, since it will be lost at the home page (unless that also is dbman driven).If it is not, maybe it would be better to remove the HOME link altogether from the bottom bar?
For you to pass along the email address do this: in sub html_footer add
$in {'order_mail'} like this:
Code:
print qq!| <A HREF="$db_script_link_url&add_form=1
&order_mail=$in{'order_mail'}"><b>Register</b></A> ! if ($per_add);
print qq!| <A HREF="$db_script_link_url&view_search=1&order_mail=$in{'order_mail'}"><b>Search</b></A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&delete_search=1
&order_mail=$in{'order_mail'}"><b>Delete</b></A> ! if ($per_del);
print qq!| <A HREF="$db_script_link_url&modify_search=1
&order_mail=$in{'order_mail'}"><b>Modify</b></A> ! if ($per_mod);
print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*&order_mail=$in{'order_mail'}"><b>List All</b></A> ! if ($per_view);
Maybe you also want to do the same in sub html_cleared_footer?
When do you want the email address (i.e. order_mail) to be cleared? As it is now it is erased once the email is sent to the customer in sub html_cleared_footer, which is called in sub html_cancel order and sub
html_send_order.
Since I haven't though about adding records at all there might well be other add bugs.
Maybe you should insert the extra line as decribed below for sub html_view_failure in all applicapable subs?
Hi Dan!
Thanks for proofing! I admit I didn't test the failed search nor the keyword search thoroughly.
For the failed search: in sub html_view_failure:
# add after
Code:
<input type=hidden name="uid" value="$db_uid">
# this line:
Code:
<input type=hidden name="order_mail" value="$in{'order_mail'}">
For the keyword search (that accidently
) can be done after a failed search add in sub html_record_long a second condition: && ($in{'keyword'} eq '' at the very top:
Code:
if
(($in{$db_key} gt 0)
&& ($in{'keyword'} eq '')) {
%rec = &get_record($in{$db_key});
}
(I'm sure you note the extra bracket
)
Drowdown menu for number of items is a good idea, I´ll take that:
In sub html_record_long replace
Code:
<$fieldtxtcolor2><B>Antal: </B><input type="antal" name="antal" size="2" value="1">
with
Code:
<$font><B>Number of items: </B>
<SELECT SIZE=1 NAME="antal">
<OPTION value=" 1">1
<OPTION value=" 2">2
<OPTION value=" 3">3
<OPTION value=" 4">4
<OPTION value=" 5">5
<OPTION value=" 6">6
<OPTION value=" 7">7
<OPTION value=" 8">8
<OPTION value=" 9">9
<OPTION value="10">10
</SELECT>
About deletion of files: I don´t want to use cookies because some people have cookies disabled. So the administrator will from time to time have clean up the orders directory. For this I have made a hack in FileMan, which I will soon (?) put for demo, but I first want to password protect the
directory.
What was it with the missing price? Have you added records and set a price that doesn't show up?
Oh, about calculation and display of cents I don't know how to do that yet
[This message has been edited by O grain (edited May 13, 2000).]
[This message has been edited by O grain (edited May 13, 2000).]