Gossamer Forum
Home : Products : DBMan : Installation :

from login automatically directed to modify own record

Quote Reply
from login automatically directed to modify own record
Perhaps strange,
DBMAn is great!
I've a database where users put information about themselves. Now if they want to change their information they have to do 4 steps:
1. login
2. click on modify
3. search their own record
4. accept modifications

Is it possible to create a form (supposed they have once created their record) where they have to put their loginname and pasword
and where they're directly led to their own record to change. (skip step 2-3)

It should be very useful and easier for them, I think. Can i do it with a form?
Suggestions??
Quote Reply
Re: from login automatically directed to modify own record In reply to
I've added two lines and modified the original lines for modify and delete. Now, if the user has admin permission, these two fonctions are accessed through the specific search menu. If user has no admin permission, access is direct to own record.

Here is the code:

sub html_footer {
# --------------------------------------------------------
# Print the menu and the footer and logo. It would be nice if you left
# the logo in. Wink
#
# We only print options that the user have permissions for.
#

print qq!<P align=center><$font>!;
print qq!| <A HREF="$db_script_link_url">Home</A> !;
print qq!| <A HREF="$db_script_link_url&admin_display=1">Admin</A> ! if ($per_admin);
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">Search</A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&modify_search=1">Modify</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&modify_form=1&userid=$db_userid">Modify</A> ! if (!$per_admin);
print qq!| <A HREF="$db_script_link_url&delete_search=1">Delete</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&delete_form=1&userid=$db_userid">Delete</A> ! if (!$per_admin);
print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*">List All</A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A> |!;
print qq!</font></P>!;

Bye now
Quote Reply
Re: from login automatically directed to modify own record In reply to
thanks, your solution is indead 1 step forward. But the question now is:

when somebody login and clicks now on
modify-my-record, he has still
1 to mark his (own) record, and
2 to click on modify

then he get his record to modify.

is it possible to offer when somebody click on modify-my-record
to bring him automatically to the form where he can modify immediately his data?

Quote Reply
Re: from login automatically directed to modify own record In reply to
Yes, replace in the code of my previous message the string "modify_form" by "modify_form_record" and the check page is skipped.
Quote Reply
Re: from login automatically directed to modify own record In reply to
Forget my last message: if a user has only one record, DBman check the number of hits and jumps directly to modify_form_record.

So you should NOT add the _record to the string.

Sorry for the confusion but it works like this with my implementation.
Quote Reply
Re: from login automatically directed to modify own record In reply to
ok, it's working and it is great. Only one problem is not solved. When somebody modifies his record, he get the data as they were in the cache. So the have to refresh i they want to modify again their record. Is there a possibility to solve it?

Thanks