L
|
larsonsc 7/5/2007 |
I use a BeforeEdit event to do this in one of my projects. In the events screen, click the table you want, then table events, Edit page, Before record updated and then try this code: //********** Insert a record into another table ************
|
B
|
Blooper 9/21/2007 |
I use a BeforeEdit event to do this in one of my projects. In the events screen, click the table you want, then table events, Edit page, Before record updated and then try this code: //********** Insert a record into another table ************
|
![]() |
Admin 9/21/2007 |
Hi, |
B
|
Blooper 9/21/2007 |
Hi, this code works in Before record added/updated events. $values array contain user-entered values there.
|
B
|
Blooper 9/21/2007 |
Hello thanks so much. I will go and try is now. Thanks again for replying
|
B
|
Blooper 9/21/2007 |
Hello again. I think I'm doing something wrong. Here is the error I get agter uploading it. Error type 8 Error description Undefined variable: values URL www.nvg.co.za/php/register.php? Error file /var/www/vhosts/nvg.co.za/httpdocs/php/include/events.php Error line 41 SQL query select count(*) from `Models` where `contact_email`='lop@lop.com' Still complains about the "$values. I need to change the date_join to the currant date to show when the person signed up. Here is the code I have. ____- function BeforeRegister($userdata) { // Parameters: // $userdata - Array. // Each field on this form represented as 'Field name'-'Field value' pair //** Insert a record into another table **** global $conn; $strSQLInsert = "update Models set date_join = now() where id = '".$values["id"]."'"; dbexec($strSQLInsert,$conn); return true; // return true if you like to proceed with registration // return false in other case } // function BeforeRegister ____
|
![]() |
Admin 9/21/2007 |
In the Before Registerevent use $userdatainstead of$values. |