I am trying to write a website from scratch and try to add a form. but if I click the "Send" button (which is redirected to a .php contact), it should send mail without opening any email, but it will not be redirected correctly ... I searched Google and did not find anything ...
code of this form:
<form action="contact.php" method="post">
<font color="ffffff">
<center>
<div>
<label for="name">Name:</label>
<input type="text" id="name" />
</div>
<div>
<label for="Username">Username(s):</label>
<input type="text" id="name" />
</div>
<div>
<label for="Job">Job:</label>
<select name="Job">
<option value="Artist">Artist</option>
<option value="Musican">Musican</option>
<option value="Props">Props</option>
<option value="Voice">Voice</option>
<option value="Effects">Effects</option>
</select>
</div>
<div>
<div>
<label>THE THING</label><br><br>
<input type="checkbox" name="Program" value="Skype">I have SKYPE<br>
<input type="checkbox" name="Program" value="Steam">I have STEAM <br>
<input type="checkbox" name="Program" value="Origin">I have ORIGIN <br>
<input type="checkbox" name="Program" value="Teamspeak">I have TEAMSPEAK <br>
</div>
</div>
<div>
<label for="Message">Message:</label>
<textarea id="Message"></textarea>
</div>
<br>
<div class="button">
<button type="submit">Send your message</button> <button type="reset">Clear the fields</button>
</div>
</center>
</font>
</form>
but when I click on this button, which should be redirected from index.html to contact.php, it just gives an error (I tried the Google and Github drive for placement, and on Dropbox it just wants to download contact.php ...) Error Gdrive: 404 Page not found, Github: 405 there is no permission and, as I said, dropbox just wants to download the file ...
PHP code:
<?php
$ToEmail = 'mymail@domain.com';
$EmailSubject = 'NEW CONTACT! READ IT STOOPID';
$mailheader = "From: ".$_POST["name"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["name"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "Name: ".$_POST["name"]."";
$MESSAGE_BODY .= "Username: ".$_POST["Username"]."";
$MESSAGE_BODY .= "Job: ".$_POST["Job"]."";
$MESSAGE_BODY .= "Program".$POST["Program"]."";
$MESSAGE_BODY .= "Message: ".nl2br($_POST["Message"])."";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
<center><h1>Thank you :D!</h1></center>
, - ? , , HTML...