I have put in the line:
@mail("ca@printline.dk", "subject", "Body text", "$xxx", "$xxx");
in the _dml.php right after the "sql("insert into..." statement to get an email every time someone creates a new entry.
"$xxx" represents the fields in the database. This works fine, except for one field which is my Primary Key field (named id_nbr) which is also an Auto Increment field.
If i just put it in as "$id_nbr", nothing appears in the email.
Can anyone tell me if there is a special way to get this field emailed too...???
Probably because the user is not entering the auto_increment value. You would have to use some sql to capture the last record_id and increment it by 1. Try adding a query before the @mail line.
(eg)
Code:
$q = 'SELECT id_nbr FROM yourtable order by id_nbr desc limit 1;';