Form calls 2 php functions

I have an html form that uses a PHP file to send data via email. I want to add code (which I already have) to generate random numbers to protect against spam. Can I call another PHP file in my form?

Here is the code that goes in the form:

<form name="mail" action="go.php" method="post" onsubmit="return CheckData()">
    <input type="text" name="q">
    <input type="submit" name="Submit" value="OK">
</form>

I'm a real newbie with PHP, so any help would be appreciated.

LozFromOz

+3
source share
2 answers

you can do this with an image in your form that calls the php file.

famous should use captcha,

read this link:

Disabling scripts from hacking your site hundreds of times per second

good captcha to insert in php:

http://recaptcha.net/plugins/php/

+3

, HTTP- URL- -. php script go.php , , , / ...

<?php // go.php
require_once 'spam_protection.php';
require_once 'form_helper.php';
require_once 'database_something.php';

....
+1

Source: https://habr.com/ru/post/1711559/


All Articles