This topic is locked

adding record value from a function

10/27/2007 2:30:08 PM
PHPRunner General questions
A
alex82 author

i have a php function that generates random values,

i mean something like:

echo create_transactionid();// Returns for example a7YmTwG4

i want to use it to add values to the field transaction ID of my table transactions,

every time a value for the record transaction ID is added has to be done with the value generated with my own function automatically,

how can i do that and where i have to include that function

thanks a lot

Sergey Kornilov admin 10/28/2007

You can put this function to include/header.php file and use it in Events like BeforeAdd or BeforeEdit.