I made a website recently for a friend. They needed a form or something so I coded the page for them. today another friend asked me to make a similar website with a form. So i just copied and pasted the code from one website to the other. But as soon as I did, the form stopped sending to the email. This is the code I am using:
<?php
$to = 'commodorePicmin@gmail.com';
$subject = 'JOB REQUEST';
$name = $_POST['name'];
$address = $_POST['address'];
$job = $_POST['job'];
$message = <<<EMAIL
Hi, my ign is $name. I want the rank $address and I would be good at this because: $job
EMAIL;
$header = '$name';
if($_POST){
mail($to, $subject, $message, $header);
}
?>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="header">
<center>
Apply for staff
</center>
</div>
<div id="menu">
<ul>
<center>
<li><a href="index.html">HOME</a></li>
<li><a href="stafflist.html">STAFF</a></li>
<li><a href="contact.html">CONTACT</a></li>
<li><a href="apply.php">APPLY</a></li>
<li><a href="donate.html">DONATE</a></li>
</center>
</ul>
</div><br>
<div class="info">
<center>Want a way to get a fast in game $1,000 Click <a href="info.php">Here</a></center>
<center><form action="?" method="post">
<ul>
<li>
<label for="name">In game name</label><br>
<input type="text" name="name" id="name" /><br>
</li>
<li>
<label for="name">Rank that I am Applying for</label><br>
<select>
<option value="Admin">Admin</option>
<option value="HeadMod">Head Mod</option>
<option value="HeadAdmin">Head Admin</option>
<option value="Builder">Builder</option>
<option value="Mod">Mod</option>
<option value="helper">Helper</option>
<option value="coowner">Co-Owner</option>
</select><br>
</li>
<li>
<label for="name">Why Would you be a good fit?</label><br>
<textarea rows="9" cols="50" name="job" id="job"></textarea>
</li>
<li>
<input type="submit" name="Submit" id="submit" value="submit">
</li>
</ul>
</form></center>
</div>
</div>
</body>
</html>