Jump to content
Larry Ullman's Book Forums

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.

Link to comment
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
Link to comment
Share on other sites

 Share

×
×
  • Create New...