I am trying to tie my html form to a PHP mailer and for some reason the form inputs are not storing in my variables. I have tried searching all over and I cannot see what I am doing wrong. Any help would be greatly appreciated.
Form handler:
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = trim($_POST["name"]);
$email = trim($_POST["email"]);
$date = trim($_POST["date"]);
$guests = trim($_POST["guests"]);
$description = trim($_POST["description"]);
}
Form:
<form role="form" class="text-center" method="POST" enctype="text/plain" action="index.php">
<div class="form-group">
<label for="name">Nombre</label>
<input type="text" class="form-control" id="name" name="name">
</div>
<div class="form-group">
<label for="email">Correo Electrónico</label>
<input type="email" class="form-control" id="email" name="email">
</div>
<div class="form-group">
<label for="date">Fecha del Evento</label>
<input type="date" id="date" class="form-control" name="date">
</div>
<div class="form-group">
<label for="guests">Número de Huéspedes</label>
<select class="form-control" id="guests" name="guests">
<option>1 - 2</option>
<option>3 - 4</option>
<option>5 - 6</option>
<option>7 - 8</option>
</select>
</div>
<div class="form-group">
<label for="description">Descripción de Evento</label>
<textarea class="form-control" id="description" rows="3" name="description"></textarea>
</div>
<div style="display: none;">
<label for="address">Address</label>
<input type="text" class="form-control" id="address" name="address">
</div>
<input type="submit" class="btn btn-default" value="Enviar">
</form>