Y need Help

Messrs I not write English

I Buy scriptcase 5 but not how to adapt to my needs
Do I need

1 ? 1 a page with an image and a button ENTER

2? 1 Login page that cosult a table in Mysql database

The program I use is the CTR04 (validation and password) do not know where to put the fields to validate not know anything about PHP

The Database is called mydepoh
The table is called usuarios
The fields are login, password, nombre, email

3rd Enter a query in a grid that already works for me

Y need to Know if any can Help me
Thank you very much by its aid

Ricardo Plattner
Buenos Aires Argentina

Re: Y need Help

  1. Create a blank app and add your HTML as needed.
  2. create a control app and add 2 field then use sc_lookup to verify data enter from field and continue.

There is a bit more, but this should get you started. There are also several sample apps on the main website that will help with this. See Control Applications.

If you are having problems with this basic setup, perhaps you should hire someone to create a sample app for you and then you can review the project.

Regards,
Scott.

Re: Y need Help

Re: Y need Help

Help I can not validate with database Mysql
Database kamdepoh
table tusuarios
field name usuario
field name clave

form ctr04 User & passwurs validation

ON VALIDATE EVENTS
sc_lookup(ds, “Select count(*) from tusuarios where usuario =@@##(login)@@## and clave= @@##(password)@@##”);
if({ds[0][0]}<=0)
{
sc_error_message(“Usuario o Clave invalidos”);
}

code generated sucesfull

Re: Y need Help

I am not sure about your delimiters around your variables … that looks like code from SC’s generated code.

Any how:

I use something like: onValidate



// sql injection protection, values are quoted
$protected_username = sc_sql_injection({input_username});
$protected_password = get_md5_password({input_password});
$protected_email    = sc_sql_injection({input_email});

$sql = 'SELECT id_user,user_token,user_name,password,id_level,email_address,id_user_status FROM users';
$sql .= ' WHERE user_name = '.$protected_username;
$sql .= ' AND password = "'.$protected_password.'"';
$sql .= ' AND email_address = '.$protected_email;
$sql .= ' AND id_user_status = 1';

sc_lookup(tbl_users,$sql);
if ({tbl_users} == false || empty({tbl_users}) ) { 
 sc_error_message('Invalid login detected!');
} else {
 // valid login, proceed
} 


Regards,
Scott.