PHP:提交按钮值发送到邮件

Im using this contact form:http://www.html-form-guide.com/contact-form/php-contact-form-tutorial.html with file upload. I added some extra fields and validation rules, everything works except for one little detail. I always get the value from the submit button on all the emails. Like this one for example:

Name: Peter White

Age: 26

Mail: test@test.com

Message: This is an example

Submit:Submit

I check all the code but i could find why is this happening. I know is just a little detail because the contact form works but i want to fix this little detail.

I really appreciate any help you can provide.

Simply remove the name attribute from your submit button like this

<input type='submit' value='Submit' />

Then, that value will not be submitted any more.

Please check your styles, scripts etc. after removing the name - maybe the name is used as a reference for form validation or styling.

Looking at your example, I think the idea of the code was to skip it in the "IsInternalVariable" method of include/fgcontactform.php

You could add 'Submit' to the $arr_interanl_vars there.

    $arr_interanl_vars = array('scaptcha',
                        'submitted',
                        'Submit',
                        $this->GetSpamTrapInputName(),
                        $this->GetFormIDInputName()
                        );