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.
Adding "Subject" Field To Php Form In Chapter 10 W/Spam Protection
Started by
Leon35
, Feb 21 2012 4:21 PM
2 replies to this topic
#1
Posted 21 February 2012 - 4:21 PM
#2
Posted 21 February 2012 - 9:19 PM
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.).
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.).
#3
Posted 22 February 2012 - 5:44 AM
Thanks for your help Hartley, much appreciated!










