Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Leon35

Adding "Subject" Field To Php Form In Chapter 10 W/Spam Protection

Recommended Posts

I have completed and tested the basic PHP form that is detailed in Chapter 10 and I have also edited the form with the spam settings as shown in Chapter 12. I have tested

it and it's works fine with no issues etc. My only problem is that I ideally need a "subject" field within the form.

 

I am unsure of how I would go about adding this field along with the appropriate spam protection.

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites

I'd start off by adding another input field to your email form. I imagine you will want to use a text input element for the subject.

 

On the PHP side, you will then want to scrub the data entered into the subject field by the user. I imagine that you can perform the same tests on the subject field as you already have for any other text fields (i.e., make sure no email-specific key phrases have been entered or JavaScript has been inserted, etc.).

  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×