Moving those lines did get rid of that error. But I'm still having problems with the file. Before trying to add this email function, it was posting changes back to the database just fine. Now, I get no changes posted, plus I'm not getting the test email either. I've attached the file again. I did make sure that the waue_update_self_2.php file had the MailTo filled in and that it was uploaded. Hopefully you can spot what's wrong!