HTML/PHP Email Form just sending one word

None of the other questions have resolved my problem. The problem is: I have an html email form, with php, when I click submit to test it sends, but it only sends one word , and that word is: From. (they are all in the same email.php file). Here is the form alone:
PHP:

    <?php

    if($_POST["message"]) {
                
        mail("my email", "Feedback for website",
                    
        $_POST["$message"]. "From: $email");
                
    }
                
?>

HTML/JS:

<form method="post">
                <h2>Name</h2>
                <input type="name" id="name" placeholder="Bill Gates" autocorrect="off" autocapitalize="off" spellcheck="false" required/>
                
                <h2>Email</h2>
                    <input type="email" id="email" placeholder="Big-Gates@thesam.co.nz" alt="try loading page again." autocorrect="off" autocapitalize="off" spellcheck="false" name="email" required/>
                <h2>Feedback:</h2>
                <textarea name="message" required></textarea><br>
                
                <button type="submit" onclick="completeFunc()">Submit</button>
            
            </form>

Thanks :)



Read more here: https://stackoverflow.com/questions/68462371/html-php-email-form-just-sending-one-word

Content Attribution

This content was originally published by King Sam at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: