close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Authenticating email

Thread began 9/23/2013 9:01 am by jlowery | Last modified 9/24/2013 7:19 am by jlowery | 2177 views | 9 replies

jlowery

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

Attached Files
contact2.php

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...