D
|
Dale 4/13/2010 |
Try something like below |
A
|
alexandra author 4/14/2010 |
I already send you a PM, but at the moment of registration there is no session ID, I guess. When I used the username from the session it created an empty record. |
D
|
Dale 4/14/2010 |
Sorry, I just assumed you had the value you needed in the $_SESSION["UserID"] variable. |
A
|
alexandra author 4/15/2010 |
Oeps (on one side I am happy that its not a simple fix. After all my hours of trying) I would hate to see someone demonstrate that I waisted a lot of time :-) |
D
|
Dale 4/15/2010 |
Going to try one more thought for you. |
A
|
alexandra author 4/15/2010 |
Dear DaleM, Happy you don't give up so easily, and this test should be giving the answer (normally) |
A
|
alexandra author 4/15/2010 |
Dear DaleM, Happy you don't give up so easily, and this test should be giving the answer (normally) This is what I got returned: what is session UserId caterineArray ( [username] => caterine [password] => caterine00 [email] => testemail@hotmail.com [fullname] => test [active] => 0 ) According to your explanation, you have been giving me the right code al along, but somehow it is not being stored in the table, the table is working for sure. Since i can create/add records via other forms. with the following code: $_SESSION["UserID"] = $userdata["username"]; global $conn; $strSQLInsert = "insert into clmain (UserID) values ('".$_SESSION["username"]."')"; db_exec($strSQLInsert,$conn); I do get an empty record in clmain I need to share another thought to see if this could affect the code functioning. In the user registration table there is one field called " active ", this field is set from 0 to 1 when the users clicks a link that is send by email to activate his/her account, could this affect the procedure of writing in another table? nasty puzzle for sure. |
D
|
Dale 4/15/2010 |
Great, feedback. Try, |
G
|
gawde 4/15/2010 |
Great, feedback. Try, $_SESSION["UserID"] = $userdata["username"]; global $conn; $strSQLInsert = "insert into clmain (UserID) values ('".$_SESSION["UserID"]."')"; db_exec($strSQLInsert,$conn); Not sure about the Active thing you mention. Lets get the table updated first. Then we can see what other info you would like to insert into that other table.
|
A
|
alexandra author 4/15/2010 |
Whohaaaaaaaaaaaaaa !!!!!!!!!!!!
|
D
|
Dale 4/15/2010 |
Glad to see it worked. You could get the job done without a session variable by using the following, |