Código HTML:
<div style="padding-left: 10px;" id="enviar" title="Enviar"> <form method="post" id="comprar" name="comprar" action="compraraxs.php" > <table cellpadding="7"> <tr> <td colspan="3"> <b><font size="2"><div style="padding-top:10px;">Datos del Voucher</font></b></td></tr><tr> <td width="170"> <label for="fecha"><font size="2">Fecha:</label></td><td width="200"> <input type="text" name="dia" size="2" value="dd" onfocus="if(this.value=='dd')this.value=''"> / <input type="text" name="mes" size="2" value="mm" onfocus="if(this.value=='mm')this.value=''" > / <input type="text" name="anio" size="4" value="aaaa" onfocus="if(this.value=='aaaa')this.value=''" ></td><td width="135"></td></tr><tr><td width="150"> <label for="hora"><font size="2">Hora:</label></td><td> <input type="text" name="hora" size="2" value="hh" onfocus="if(this.value=='hh')this.value=''" > : <input type="text" name="minuto" size="2" value="mm" onfocus="if(this.value=='mm')this.value=''" > </td></tr><tr> <td width="150"> <label for="operacion"><font size="2">Número de operación:</label></td><td> <input type="text" name="operacion" id="operacion"/> </td></tr><tr> <td width="150"> <label for="agencia"><font size="2">Nombre de la agencia:</label></td><td> <input type="text" name="agencia" id="agencia"/> </td></tr> <tr> <td colspan="3"> <b><font size="2"><div style="padding-top:10px;">Datos Personales</font></b></td></tr><tr> <td width="150"> <label for="iduser"><font size="2">ID de Usuario:</label></td><td> <input type="text" name="iduser" id="iduser"/> </td></tr><tr> <td width="150"> <label for="nick"><font size="2">Nick del Juego:</label></td><td> <input type="text" name="nick" id="nick"/> </td></tr><tr> <td width="150"> <label for="email"><font size="2">Email:</label></td><td> <input type="text" name="email" id="email"/> </td></tr> <tr> <td colspan="3"> <div align="center"><input class="boton" type="image" name="Submit" src="imagenes/enviar.jpg"> </div> <br> <font size="1" color="#e2e2e2"><b>NOTA:</b> Los pines se enviarán al correo proporcionado en este formulario.</i></font> </td></tr></table> </form> </div>
Código PHP:
< ?php
$dia = $_POST['dia'];
$mes = $_POST['mes'];
$anio = $_POST['anio'];
$hora = $_POST['hora'];
$minuto = $_POST['minuto'];
$operacion = $_POST['operacion'];
$agencia = $_POST['agencia'];
$iduser = $_POST['iduser'];
$nick = $_POST['nick'];
$email = $_POST['email'];
$header = 'From: ' . $mail . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$mensaje = "Fecha: " . $dia . " / " . $mes . " / " . $anio . " a las " . $hora . " : " . $minuto . " \r\n";
$mensaje = "Numero de operacion: " . $operacion . " \r\n";
$mensaje = "Agencia: " .agencia . " \r\n";
$mensaje = "ID de usuario: " .iduser . " \r\n";
$mensaje = "Nick del juego: " .nick . " \r\n";
$mensaje = "Email: " .email . " \r\n";
$para = '[email protected]';
$asunto = 'Compra de Axs';
mail($para, $asunto, utf8_decode($mensaje), $header);
echo '&estatus=ok&';
?>
http://cabinasperu.byethost16.com/
el formulario es el q esta en fondo celeste, espero me ayuden , gracias