This topic is locked

change record from another table

10/3/2007 4:11:36 AM
PHPRunner General questions
L
luck author

Hi,
I have 2 tables with the following structure:
_Users
First Name

Last Name

Phone

Adress
_Login
Username

Password

Acivateprofile
When i register a new user i add a value to Activateprofile: Yes or No.

When i login in the new account with the new user i created, i insert data in users table. After data is inserted i want to automatically delete data from field Activateprofil coresponding to this user from login . Please tell me how to do that.
Thank you very much and i wait for sollutions!

J
Jane 10/4/2007

Hi,
use AfterSuccessfulLogin[b/] event on the [b]Events tab for this purpose.

Here is a sample code:

global $conn;

$strUpdate = "update _Login set Acivateprofile=NULL where Username='".$_SESSION["UserID"]."'";

db_exec($strUpdate,$conn);

L
luck author 10/4/2007

Hi,

use AfterSuccessfulLogin[b/] event on the [b]Events tab for this purpose.

Here is a sample code:


Thank you very much!