What is causing the form to send automatically upon page load in the PHP code provided?

The issue of the form sending automatically upon page load in the provided PHP code is likely due to the form submission being triggered by the condition `if($_SERVER["REQUEST_METHOD"] == "POST")`. To solve this issue, you can check if the form has been submitted by checking if specific form fields are set in the `$_POST` array.

<?php
if(isset($_POST['submit'])) {
    // Process form data here
}
?>

<form method="post" action="">
    <!-- Form fields go here -->
    <input type="submit" name="submit" value="Submit">
</form>