Código HTML:
Ver original
<!doctype html> <html lang=''> <head> <meta charset='utf-8'> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> </head> <body> <div> <form name="serie" id="serie" method="post" action="pagina2.php"> <table width="294" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20" height="22"> </td> </tr> <tr> <td height="22"> </td> </tr> </table> <br> <CENTER><input type="image" src="images/sig.png" name="submit" value="Enviar"></CENTER> </form> </div> </body> <html>
PAGINA2
Código PHP:
Ver original
<!doctype html> <html lang=''> <head> <meta charset='utf-8'> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="script.js"></script> <?php $_SESSION['radio2'] = $_POST['radio2']; ?> </head> <body> <form name="serie" id="serie" method="post" action="pagina3.php"> <table width="294" border="0"> <tr> <td width="54"><h6 style="margin:0;">Nombre:</h6></td> <td width="224"><input name="nombre" type="text" id="nombre" style="background-color:#CCCCCC" size="25" maxlength="30" required/></td> </tr> <tr> <td><h6 style="margin:0;">Apellido:</h6></td> <td><input name="apellido" type="text" id="apellido" style="background-color:#CCCCCC" size="25" maxlength="30" required/></td> </tr> <tr> <td><h6 style="margin:0;">Tlf:</h6></td> <td><input name="tlf" type="text" id="tlf" style="background-color:#CCCCCC" size="25" maxlength="15" required/></td> </tr> <tr> <td><h6 style="margin:0;">Email:</h6></td> <td><input name="mail" type="text" id="mail" style="background-color:#CCCCCC" size="25" required/></td> </tr> </table><br> <center> <input type="image" src="images/sig.png" name="submit" value="Enviar"> </center> </form> </body> <html>
PAGINA 3
Código PHP:
Ver original
<?php $_SESSION['radio2'] = $_POST['radio2']; $opcion = $_POST['radio2']; $opcion2 = $_POST['opcion']; $opcion4 = $_SESSION['radio2']; $nombre = $_POST['nombre']; $apellido = $_POST['apellido']; $tlf = $_POST['tlf']; $mail = $_POST['mail']; $header = 'From: ' . $mail . " \r\n"; $header .= "Mime-Version: 1.0 \r\n"; $header .= "Content-Type: text/plain"; $mensaje .= "SELECCIÓN DEL CHECKBOX: " . $_SESSION['radio2'] . " \r\n\n"; $mensaje .= "Este mensaje fue enviado por: \r\n\n"; $mensaje .= "Nombre: " . $nombre . " \r\n"; $mensaje .= "Apellido: " . $apellido . " \r\n"; $mensaje .= "Telefono: " . $tlf . " \r\n"; $mensaje .= "Su e-mail es: " . $mail . " \r\n"; $asunto = 'SOLICITUD'; echo "<script>document.location.href='index.html';</script>\n"; ?>