MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Go to checkout only if login is successful



******    message to minivend-users from "Michael Radke" <mra@trendware.de>     ******

Well, Gideon...

[if session logged_in][then]
            Hi there, you are logged in !
[/then][else]
            [data session failure] <----???
            <br>
            Please, log in now.

[set login]
mv_arg0=LITERAL(login)
mv_subroutine=userdb
[/set]

<form action="[process-target _self]" method="post">
<input type="hidden" name="mv_click" value="login">
<input type="hidden" name="mv_doit"  value="return">
<input type="hidden" name="mv_nextpage" value="catalog">
<input type="hidden" name="mv_nextpage" value="name of THIS! page">
User : <input type="text" name="mv_username"><br>
Pass : <input type="password" name="mv_password">
</form>
[/else]
[/if]

... should do the job... working with that here, it works very well.


IN THE CATALOG.CFG, i made an entry to connect a database table
as "userdb"-database :

Database userdb TABLENAME-HERE
dbi:mysql:DATABASENAME_HERE:localhost:3306
Database userdb USER <DATABASE-USER>
Database userdb PASS <DATABASE-PASSWORD>


As you can see, i am working with MySQL. Should also work with ascii-
tables (files) and with other database-servers which I don't have
experience with..



The table of my database looks like :

#
# Table structure for table 'userdb'
# the first two fields hold the username (==> code) and the
# password !
CREATE TABLE userdb (
  code varchar(16),
  password varchar(16),
  anrede varchar(40),
  name1 varchar(40),
  name2 varchar(40),
  anschrift1 varchar(40),
  anschrift2 varchar(40),
  land char(3),
  plz varchar(6),
  ort varchar(40),
  ansprechpartner varchar(40),
  kdkz char(3),
  zahlung char(2)
);


When a customer is logged in, you can access the customers data
with [value name1] and so on in your code. For example, you could
have stored his address and payment options and so on here.

Think, this should help you ..

Regards,
Michael Radke



-----Urspr&#252;ngliche Nachricht-----
Von: Gideon van Gelder <gideon@swingmaster.nl>
An: minivend-users@minivend.com <minivend-users@minivend.com>
Datum: Montag, 1. M&#228;rz 1999 20:41
Betreff: Go to checkout only if login is successful


>******    message to minivend-users from "Gideon van Gelder"
<gideon@swingmaster.nl>     ******
>
>Hi All,
>
>There's a problem I can't seem to solve:
>I want all my customers to successfully login to the UserDB before
they can
>enter the checkout page.
>If the login fails, I want them to again see the login-page again
stating
>the [data session failure], not the checkout-page.
>
>Any ideas ?
>
>Thanks in advance,
>
>-Gideon
>
>-
>To unsubscribe from the list, DO NOT REPLY to this message.  Instead,
send
>email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
>Archive of past messages:
http://www.minivend.com/minivend/minivend-list

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: