This topic is locked

Add field in login page

11/19/2008 10:21:14
PHPRunner General questions
F
francot author

Hi,

is it possible to create a new text field in login page, save enterd value in a variable (global ?, $_session?, $_post?) and use this value as part of SQL query in other pages?
If it is, what must i do?
franco

J
Jane 11/20/2008

franco,
here are some tips:

  1. create new input manually on theVisual Editortab in HTML mode.

    Here is a sample:
    <INPUT id=another value=another name=another>


2. then save it in the session variable in the AfterSuccessfulLoginevent on the Events tab:

$_SESSION["another"] = $_REQUEST["another"];

F
francot author 11/20/2008

many tanks Jane, work fine...
now i have my variable S_SESSIO["somevalue"] and I can see in other pages....
Ok...bat..

in my database some fields are AES_CRYPTED and I cannot write the key of decodes in the code.

In Edit SQL Query this query work fine:

[codebox]select

codice,

userid,

AES_DECRYPT(pa_cit,'key') AS Citta,

AES_DECRYPT(pa_cap,'key') AS CAP,

AES_DECRYPT(pa_pro,'key') AS Prov,

FROM anagrafe[/codebox]
this query generate error:

[codebox]select

codice,

userid,

AES_DECRYPT(pa_ind,$_SESSION["chiave"]) AS Indirizzo....[/codebox]
I tried in this mode, in Event-> before SQLquery

[codebox]$strSQL=str_replace("decritta", '$_SESSION["chiave"]', $strSQL);[/codebox]
In Edit sql query:

[codebox]AES_DECRYPT(cognome,'decritta') AS Cognome,[/codebox]
field is decrypted strong.

As I can give in order to pass the value of $_SESSION [" key"] to the string sql?
many many many tanks

Sergey Kornilov admin 11/20/2008

Answered to personal email.

F
francot author 11/23/2008

Answered to personal email.


many tanck's