PHP: Submit button value is send into mail

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: [emailprotected]

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.

View More Answer And Comment : Stackoverflow


Top Answer 1

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()
                        );

Top Answer 2

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()
                        );

View More Answer And Comment : Stackoverflow

Clear browser cache using jQuery

In my mini project i'm trying to crop an already uploaded image and then show the cropped image in place of the original image in the gallery page. But after I'm done with cropping i'm shown the the [Read More...]

Nginx + LUA, how to output file?

Having trouble with file output in Nginx + Lua. I chosen LUA, because nginx logic is pretty complicated, based on referrer or subdomains, etc. Having request like /img/am1/s/1.jpg I need to check if [Read More...]