Realizo un modulo en php donde se levanta un ticket de trabajo, lo que quiero que haga es que al llenar y enviar el formulario envié automáticamente un correo con los datos que lleno el usuario de confirmación espero en verdad me puedan orientar. Anexo mi código.
Saludos
<?php
$priorities =mysqli_query($con, "select * from priority");
$turns =mysqli_query($con, "select * from turn");
$areas =mysqli_query($con, "select * from area");
$statuses =mysqli_query($con, "select * from status");
$kinds =mysqli_query($con, "select * from kind");
$categories =mysqli_query($con, "select * from category");
?>
<div> <!-- Modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg-add"><i class="fa fa-plus-circle"></i> Agregar Ticket</button>
</div>
<div class="modal fade bs-example-modal-lg-add" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">Agregar Tickets</h4>
</div>
<div class="modal-body">
<form class="form-horizontal form-label-left input_mask" method="post" id="add" name="add">
<div id="result"></div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Tipo
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="kind_id" >
<?php foreach($kinds as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Titulo<span class="required">*</span></label>
<div class="col-md-9 col-sm-9 col-xs-12">
<input type="text" name="title" class="form-control" placeholder="Titulo" >
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Descripción <span class="required">*</span>
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<textarea name="description" class="form-control col-md-7 col-xs-12" placeholder="Descripción"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Seguimiento de Proceso
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<textarea name="process_1" class="form-control col-md-7 col-xs-12" placeholder="Seguimiento de Proceso"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Fin de Proceso
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<textarea name="process_2" class="form-control col-md-7 col-xs-12" placeholder="Fin de Proceso"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Area
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="area_id" >
<option selected="" value="">-- Selecciona --</option>
<?php foreach($areas as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Categoria
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="category_id" >
<option selected="" value="">-- Selecciona --</option>
<?php foreach($categories as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Prioridad</span>
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="priority_id" >
<option selected="" value="">-- Selecciona --</option>
<?php foreach($priorities as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Turno<span class="required">*</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="turn_id" >
<option selected="" value="">-- Selecciona --</option>
<?php foreach($turns as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Estado
</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<select class="form-control" name="status_id" >
<option selected="" value="">-- Selecciona --</option>
<?php foreach($statuses as $p):?>
<option value="<?php echo $p['id']; ?>"><?php echo $p['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3">
<button id="save_data" type="submit" class="btn btn-success">Guardar</button>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div> <!-- /Modal -->