PHP脚本因Isset()而死。 其他选择?

I have a contact form I'm trying to run, but for whatever reason the script will die every time I attempt to submit it. Not sure why. Is there anything blantanly wrong with the code below? I wasn't using isset() before, but someone here suggested I do and now it breaks the page.

FORM

            <form class="contactform" method="post" action="php/contact.php">
                <h3>Name</h3>
                <input class="form inputboxes" type="text" name="name">
                <h3>Email</h3>
                <input class="form inputboxes" type="email" name="email">
                <h3>Phone</h3>
                <input class="form inputboxes" type="number" name="phone">
                <h3>Message</h3>
                <textarea class="form inputboxes" name="message"></textarea>
                <h3 class="captchastyle">Are you real? What is 2 + 2?</h3><input class="captcha captchastyle" type="text" name="captcha" maxlength="1">
                <input class="form submit" name="submit" type="submit" value="Submit">
            </form>

PHP

<?php
    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $message = $_POST['message'];
    $captcha = $_POST['captcha'];
    $from = 'From: HankSmith.com Contact Form'; 
    $to = 'thatbraxjohnsonguy@gmail.com'; 
    $subject = 'HANK SMITH CONTACT FORM';

    $body = "
            From: $name
 
            E-Mail: $email
 
            Phone: $phone

            Message: $message
";

if (isset($_POST['submit'] && $captcha == 4)) {                
        if (mail ($to, $subject, $body)) { 
        echo '<p style="margin-top: 150; text-align:center; font-size: 18px;">Your message has been sent! Click <a href="../index.php">here</a> to return to the website.</p>';
        }  else {
            echo '<p>Problem sending mail!';
        }
    } else { 
        echo '<p>Something went wrong, try again later!</p>'; 
    }
?>

ERROR_LOG

[09-Feb-2017 12:15:46 America/New_York] PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/yourerlv/public_html/hanksmith.com/php/contact.php on line 17

You're doing it wrong. You need to move the parenthesis over so it's only evaluating the one variable:

if (isset($_POST['submit']) && $captcha == 4) { 
                          ^

Change code:

if (isset($_POST['submit'] && $captcha == 4)) {  // Original
if (isset($_POST['submit']) && $captcha == 4 ) { // Changed