![]() |
Sergey Kornilov admin 12/8/2006 |
Max, function BeforeLogin($username, $password) |
M
|
maxcolo author 12/9/2006 |
Hi admin, tanks for your attention |
![]() |
Alexey admin 12/11/2006 |
Max, |
M
|
maxcolo author 12/11/2006 |
Max, I'm a quite confused with your messages. What recording are you talking about ? How this recording is related to Login page ? Describe your task clearly and I'll try to help you.
function AfterSuccessfulLogin() { //** Insert a record into another table **** global $conn; $strSQLInsert = "insert into prova (id, nome, cognome) values ($id, $nome, $cognome)"; db_exec($strSQLInsert,$conn); } but Ihave this error: Errore di tipo 8 Errore di descrizione Undefined variable: id URL localhost/lavoro1/login.php? Errore di file C:\WM\www\lavoro1\include\events.php Errore di linea 7 Query SQL select * from `curricula` where `nome`='123456' and `cognome`='123456'
|
J
|
Jane 12/12/2006 |
Max, function AfterSuccessfulLogin() { global $conn; //select last inserted id from table1 $str = "select last_insert_id() from table1"; $rs = db_query($str,$conn); $data = db_fetch_numarray($rs); //select nome and cognome from table1 $str2 = "select nome, cognome from table1 where id=".$data[0]; $rs2 = db_query($str2,$conn); $data2 = db_fetch_array($rs2); $id = $data[0]; $nome = $data2["nome"]; $cognome = $data2["cognome"]; //insert id, name and cognome to the table2 $strSQLInsert = "insert into prova (id, nome, cognome) values ($id,'".$nome."','".$cognome."')"; db_exec($strSQLInsert,$conn); }
|
M
|
maxcolo author 12/12/2006 |
Thank you so much, Jane
|
J
|
Jane 12/13/2006 |
Max, |