Authenticating email
I'm trying to add an email authentication routine to a client's contact form. I have an "active" field in the contact table which is initially set to 0, as well as a key field that holds a unique ID. Here's how I expect it to work:
1. Client submits form with name and email address. A hidden field contains the unique ID created by setting the value to <?php echo uniqid() ?>.
2. On submission, the info is inserted to the contacts table and an email sent that contains a link to the confirmation page with the unique ID added as a URL arg. The browser is redirected to the confirm.php page which initially has a message about the sent email.
3. When the user clicks the email link, it revisits the confirm.php page with the Unique ID, which displays a "you're confirmed" message and updates the contacts table active value to 1.
Steps 1 & 2 work, but I get an error after the email is sent. Here's the error dump:
Notice: Undefined index: waue_contact2_2_Status in /contact2.php on line 152
Notice: Undefined index: waue_contact2_2_Index in /contact2.php on line 153
Notice: Undefined index: waue_contact2_2_From in /contact2.php on line 154
Notice: Undefined index: waue_contact2_2_To in /contact2.php on line 155
Notice: Undefined index: waue_contact2_2_Subject in /contact2.php on line 156
Notice: Undefined index: waue_contact2_2_Body in /contact2.php on line 157
Notice: Undefined index: waue_contact2_2_Header in /contact2.php on line 158
Notice: Undefined index: waue_contact2_2_Log in /contact2.php on line 159
Warning: Cannot modify header information - headers already sent by (output started at /contact2.php:152) in /contact2.php on line 162
As you can see from the attached file, lines 152-162 is where the session variables are set for the email. What's odd is that the email is somehow sent. I also do not go to the confirm.php page as expected (it's correctly defined at the $GoToPage variable), but I suspect that's because of the errors encountered.
How do I get over this stumbling block?
Thanks - Joe