This topic is locked

Re-enter Password / Entries without corresponding fields

8/13/2008 2:38:46 AM
PHPRunner General questions
J
jaflores author

Hi, newbie here.
In my t_access table, i have the fields loginid and password, in add/edit, i'd like
Login Id:

Password:

Re-enter Password:
where Re-enter Password does not have a corresponding field in the table, and later validate Password and Re-enter Password (they should be the same).
How do I add fields in the add/edit screens that does not have corresponding fields in the table?
Thanks in advance...

J
Jane 8/13/2008

Hi,
here are some tips:

  1. edit your SQL query on the Edit SQL query tab.

    Here is a sample:
    select loginid,

    password,

    password as password2

    from TableName



2. check password2 on the add page only on the Choose fieldstab.

3. check entered values in the Before record added event on the Events tab and remove password2 field from update SQL query.

Here is a sample:

if ($values["password"]==$values["password2"])

{

unset($values["password2"]);

return true;

}

else

return false;

J
jaflores author 8/13/2008

nice! should have thought of that! you're the best!
so if i need additional entry fields for validation and calculation purposes, this is the way to go, add to the sql

J
jaflores author 8/13/2008

hi jane, any chance i or you can edit to title of this topic? it should read:
Entries without corresponding fields (instead of with corresponding...)
might help other newbies like me...