home *** CD-ROM | disk | FTP | other *** search
/ PC Open e89 / pcopen_e89.iso / corsi / webdeveloper / lezione_2 / daticompleticookie2.asp < prev    next >
Encoding:
Text File  |  2003-10-18  |  1.2 KB  |  51 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2.  
  3. <html>
  4. <head>
  5.     <title>Un form</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <%
  11. Dim strHobby
  12. Dim blnMusica
  13.  
  14. blnMusica = false
  15. strHobby = request.form("chk_hobby")
  16.  
  17. For Each hobby in request.form("chk_hobby")
  18.     If hobby = "Musica" Then
  19.         blnMusica = true
  20.     End If
  21. Next
  22.  
  23. response.cookies("txt_nome") = request.Form("txt_nome")
  24. response.cookies("txt_cognome") = request.Form("txt_cognome")
  25. response.cookies("rad_sesso") = request.Form("rad_sesso")
  26. response.cookies("sel_eta") = request.Form("sel_eta")
  27. response.cookies("chk_hobby") = request.Form("chk_hobby")
  28. response.cookies("txa_note") = request.Form("txa_note")
  29.  
  30. %>
  31.  
  32. <% if blnMusica = true Then %>
  33. <p>Caro <%=request.Form("txt_nome")%>, ho visto che ti interessi di musica. Ti dispiace indicarmi il nome del tuo cantante o gruppo preferito?</p>
  34. <form action="visdaticompleticookie2.asp" method="post">
  35.  
  36. Cantante o gruppo preferito <input type="text" name="txt_cantante">
  37.  
  38. <input type="submit" value="Invia">
  39.  
  40. </form>
  41.  
  42. <% else %>
  43.  
  44.  
  45. <p>Grazie per aver inviato i tuoi commenti, peccato non ti interessi di musica!</p>
  46.  
  47. <% end if %>
  48.  
  49. </body>
  50. </html>
  51.