![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
13/08/2007, 14:24
|
| | Fecha de Ingreso: enero-2002 Ubicación: Graná
Mensajes: 646
Antigüedad: 23 años, 1 mes Puntos: 0 | |
Re: php con marcos Tó eso: (un formulario que mete datos en una bbdd) Código PHP: <? include_once ("config.php"); include_once ("funciones.php");
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin título</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .Estilo4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #c7d450; font-weight: bold; } .textobienvenida { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #CCCCCC; } .textos { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #666666; } .Estilo10 {font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #666666; } .Estilo12 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #757575; } .Estilo13 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #757575; } --> </style></head>
<body> <table width="622" height="405" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="318" rowspan="4" valign="top">'; if (!isset ($_POST['enviar'])) echo '<table width="312" border="0" cellpadding="0"> <tr> <td width="306"><div align="justify"><span class="Estilo10">XI JORNADAS ANDALUZAS DE PODOLOGÍA<br /> Málaga, 23 y 24 de noviembre de 2007</span><span class="Estilo4"><br /> FORMULARIO DE INSCRIPCIÓN </span><br /> <span class="Estilo13">Para asegurar y reservar plaza es necesario completar este formulario, enviarlo al colegio adjuntando el justificante de ingreso . </span><br /> <br /> </div></td> </tr> <tr> <td class="Estilo10"> <form name=inscripcion action="'.$_SERVER['PHP_SELF'].'" method="post"> <table width="291" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="83" class="Estilo13">Nombre:</td> <td width="198" class="Estilo13"><label> <input name="nombre" type="text" id="nombre" /> </label></td> </tr> <tr> <td class="Estilo13">Estudiante:</td> <td class="Estilo13"><span class="Estilo12">si</span><span class="Estilo4"> <label> </label> </span> <label> <input name="estudiante" type="radio" value="si" /> <span class="Estilo12">no </span> <input name="estudiante" type="radio" value="no" /> </label></td> </tr> <tr> <td class="Estilo13">Nº Colegiado: </td> <td class="Estilo13"><input name="colegiado" type="text" id="colegiado" /></td> </tr> <tr> <td class="Estilo13">Domicilio:</td> <td class="Estilo13"><input name="domicilio" type="text" id="domicilio" /></td> </tr> <tr> <td class="Estilo13">Ciudad:</td> <td class="Estilo13"><input name="ciudad" type="text" id="ciudad" /></td> </tr> <tr> <td class="Estilo13">Provincia:</td> <td class="Estilo13"><input name="provincia" type="text" id="provincia" /></td> </tr> <tr> <td class="Estilo13">C.P.</td> <td class="Estilo13"><input name="cp" type="text" id="cp" /></td> </tr> <tr> <td class="Estilo13">Teléfono:</td> <td class="Estilo13"><input name="telefono" type="text" id="telefono" /></td> </tr> <tr> <td class="Estilo13"> </td> <td><label> <input name="enviar" type="submit" id="enviar" value="Enviar" /> </label></td> </tr> </table> </form> </td> </tr> <tr> <td><div align="justify" class="Estilo13"> <p><span class="Estilo4">FORMA DE PAGO:</span> Las inscripciones se considerarán formalizadas una vez se realice el pago mediante<br /> cheque/transferencia bancaria al Colegio Profesional de Podólogos de Andalucía a la cuenta del Banco Sabadell: 0081 0225 15 0001664367<br /> <br /> ENVIAR A: Colegio Profesional Podólogos Andalucía C/Albuera nº15 ppal 41001 Sevilla <br /> <br /> Fax: 954 226 123<br /> [email][email protected][/email] <br /> [url]www.colegiopodologosandalucia.org[/url] <br /> <br /> </p> </div></td> </tr> </table>'; else{ unset ($_POST['enviar']); $consulta="select count(*) from inscripcion"; $resultado=mysql_fetch_row(mysql_query($consulta)); $id=$resultado[0]+1; $consulta="insert into inscripcion values ('".$_POST['nombre']."', '".$_POST['estudiante']."','".$_POST['colegiado']."','".$_POST['domicilio']."','".$_POST['ciudad']."','".$_POST['provincia']."','".$_POST['cp']."','".$_POST['telefono']."', '$id')"; mysql_query($consulta) or vuelca_error ($fichero_log, 'Error en '.$_SERVER['PHP_SELF'].' al hacer la consulta: $consulta. El error fue: '.mysql_error()); echo '<table width="312" border="0" cellpadding="0"> <tr> <td width="306" class="Estilo13">Inscripción realizada con éxito</td> </tr> </table>'; } echo ' </td> <td width="304" height="251" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="304" height="300"> <param name="movie" value="bienvenida.swf" /> <param name="quality" value="high" /> <embed src="bienvenida.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="304" height="300"></embed> </object></td> </tr> <tr> <td rowspan="2" valign="top"><table width="303" border="0"> <!--DWLayoutTable--> <tr> <td width="297" height="144" valign="top" bgcolor="#F3F3F3" class="Estilo4"><img src="img/titulo-clinicas.jpg" width="164" height="46" /><br /> <table width="243" border="0" align="center"> <tr> <td width="98" class="textos">Provincia:</td> <td width="92"><label> <input name="textfield8" type="text" size="12" /> </label></td> </tr> <tr> <td class="textos">Codigo Postal: </td> <td><input name="textfield82" type="text" size="12" /></td> </tr> <tr> <td><label></label></td> <td><input type="submit" name="Submit" value="Enviar" /></td> </tr> </table></td> </tr> </table></td> </tr> <tr> </tr> <tr> <td> </td> </tr> </table> </body> </html>'; ?>
Última edición por GatorV; 13/08/2007 a las 14:27
Razón: Agregando etiquetas PHP
|