Ayuda a novato con formulario

From: Date: Fri, 14 Feb 2003 09:18:59 +0000
Subject: Ayuda a novato con formulario
Groups: php.general.es 
Request: Send a blank email to general-es+get-32394@lists.php.net to get a copy of this message
Quisiera pediros ayuda con el formulario que os adjunto. He intentato seguir los pasos que dan para la creación de formularios en el portal educativo de mi comudiad http://www.educastur.princast.es/usuarios/formmail.php pero con poco éxito. No se muy bien como añadir los campos que me interesan. ¿Me podríais echar un cable por favor? Gracias a todos <html> <head> <title>Web quest</title> </head> <body bgcolor="#FFFFFF"> <?php // Si se ha cubierto y enviado el formulario lo procesamos if ($submit == 'enviar') { // Poner aquí la dirección de correo electrónico a la // que se remitirá el contenido del formulario $to = "antonioff@educastur.princast.es"; // Asunto del correo. También podríamos dejar que lo // rellenase el usuario en el formulario $subject = "Answers to webquest"; // Contenido del mensaje. Ponemos delante el // remitente $message = "$nombre ($email)\n\n$comentarios\n"; // Cabecera del mensaje. No se verá, pero es necesario // para que nos funcione todo bien $headers = "From: $nombre\nTo: Centro\nReply-To: $email"; // Envío del mensaje if (mail($to, $subject, $message, $headers)) { // Ha funcionado print "<p>Su formulario ha sido remitido.</p>"; } else { // No ha funcionado print "<p>No se ha podido remitir el formulario.</p>"; print "<p><a href=javascript:history.back()>Volver</a></p>"; } } // Si no se ha procesado el formulario es que aún no lo hemos // presentado, así que hagámoslo else { ?> <form action="<?php echo $PHP_SELF ?>" method="post"> <div align="center"> <p><strong><font size="6">The News </font></strong></p> <p>&nbsp;</p> <p align="left"><strong><font size="3">Nombre</font></strong> <input name="nombre" type="text" size="50"> </p> <p align="left">E-mail (opcional) <input name="e-mail" type="text" size="50"> </p> </div> <p>1. Find the top story in The News of the World</p> <p> <input name="Find top story in The News of the World" type="text" id="1" size="100"> </p> <p>2. Find a webcam of Edinburgh Castle in BBCi. Where is the view from?</p> <p> <input name="2" type="text" size="100"> </p> <p>3. Find the common top story to most of the broadsheets for today.</p> <p> <input name="3" type="text" size="100"> </p> <p>4. In the audio news section of the BBCi find today&#8217;s headlines.</p> <p> <textarea name="4" cols="70" rows="5"></textarea> </p> <p>5. In the Comment section of The Times find the values that Europe and America are supposed to share.</p> <p> <textarea name="5" cols="70" rows="5"></textarea> </p> <p>6. In The Guardian there is a review on The Pianist. Give details of cast, director and a brief summary.</p> <p> <textarea name="6" cols="70" rows="5"></textarea> </p> <p>7. The Observer is owned by which other newspaper?</p> <p> <input name="7" type="text" size="100"> </p> <p>8. Under which section of The Sun can you find a story about Madonna?</p> <p> <input name="8" type="text" size="100"> </p> <p>9. What newspaper is running a contest giving a poetry book for Valentine&#8217;s? What authors does this book feature?</p> <p> <input name="9" type="text" size="100"> </p> <p>10. In The Independent find an article entitled &#8220;It's time to revise your study habits&#8221; and give a brief summary.</p> <p> <textarea name="10" cols="80" rows="5"></textarea> </p> <p>11. Why do you think tabloids are also known as &#8220;red tops&#8221;?</p> <p> <input name="11" type="text" size="100"> </p> <p>12. Who does film reviews in The Mirror? What does he think of &#8220;The Good Girl&#8221;?</p> <p> <textarea name="12" cols="80" rows="5"></textarea> </p> <p>13. In Loot find a house to rent in Muswell Hill, London for less than &pound;250 a week.</p> <p> <textarea name="13" cols="80" rows="5"></textarea> </p> <p></p> </form> <? } ?> </body> </html>

« previous php.general.es (#32394) next »