My php form on my website is ending blank submissions to my email [duplicate]

Below is the php code i have on my website. We have been getting some email form submissions that are working but we have also been getting a large amount of empty submissions. When i try to submit a form without filling it out the site wont allow it. BUT lately a. lot have been coming in looking like this.

“Information Submitted:
Name:
Email:
Phone:
Message:

Is this someone trying to hack my site?

I am very new to coding/backend web development and have basically taught myself everything through youtube so i definitely need some help.

$userName       = $_POST['name-3'];
$userPhone      = $_POST['name-2'];
$userEmail = htmlspecialchars($_POST['email-2']);
$userMessage    = $_POST['email-3'];

$to             = "[email protected]";
$subject        = "Email from my website";
$body           = "Information Submitted:";

$body .= "rn Name: " . $userName;
$body .= "rn Email: " . $userEmail;
$body .= "rn Phone: " . $userPhone;
$body .= "rn Message: " . $userMessage;

mail($to, $subject, $body);///

if (filter_var($userEmail, FILTER_VALIDATE_EMAIL)){
    
 //email is valid
} else {
    //email is invalid
}

if ($_POST['submit']) {
    if (mail ($to, $subject, $body, $from)) { 
       $success = "Message successfully sent";
    } else {
        $success = "Message Sending Failed, try again";
    }
}

My site is hosted on Cpannel through Godaddy. In my web files, there is an error log that tells me “Undefined array key “submit” in /send.php” for each line of the fields below. I feel like this is going to be a super simple fix and I would appreciate the help!

I have tried adding different validations and such but in general I am just confused.