Modificare il file:
\Backup 02-06-2024\Prova-DM.asp
<%@LANGUAGE = VBScript%> <% Dim invio, nome, cognome, indirizzo, telefono invio = Request.Form("invio") nome = Request.Form("nome") cognome = Request.Form("cognome") indirizzo = Request.Form("indirizzo") telefono = Request.Form("telefono") Dim messaggio, errore errore = 0 messaggio = "<span style=""color: #FF0000;"">Campo obbligatorio!</span>" %> <!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=utf-8" /> <title>Documento senza titolo</title> <title>Controllo integrato in un form con ASP ed i cookies</title> <style type="text/css"> p, input { font: normal 12px verdana; } input { width: 250px; } </style> </head> <body> <form method="post" action="Prova-DM.asp"> <p> Nome <% If invio <> "" And nome = "" Then Response.Write messaggio errore = errore + 1 End If %> <br><input type="text" name="nome" value="<%=nome%>"> </p> <p> Cognome <% If invio <> "" And cognome = "" Then Response.Write messaggio errore = errore + 1 End If %> <br><input type="text" name="cognome" value="<%=cognome%>"> </p> <p> Indirizzo <% If invio <> "" And indirizzo = "" Then Response.Write messaggio errore = errore + 1 End If %> <br><input type="text" name="indirizzo" value="<%=indirizzo%>"> </p> <p> Telefono <% If invio <> "" And telefono = "" Then Response.Write messaggio errore = errore + 1 End If %> <br><input type="text" name="telefono" value="<%=telefono%>"> </p> <p><input type="submit" name="invio" value="Invio"></p> </form> <% If invio <> "" And errore = 0 Then With Response .Write "<p>E' solo un esempio!</p>" .Write "<p>" .Write "Nome: " & nome & "<br>" .Write "Cognome: " & cognome & "<br>" .Write "Indirizzo: " & indirizzo & "<br>" .Write "Telefono: " & telefono .Write "</p>" End With End If %> </body> </html>
[
Íàçàä
]