salve a tutti, sapete se esiste uno script per un sondaggio pronto da emttere in un sito ?
GRAZIE
salve a tutti, sapete se esiste uno script per un sondaggio pronto da emttere in un sito ?
GRAZIE
Tu sei uno schiavo Neo!
Come tutti gli altri sei nato in catene,
sei nato in una prigione che non ha sbarre, che non ha mura, che non ha odore,una prigione per la tua mente!".
Morpheus
nessuno ?
![]()
![]()
![]()
![]()
oppure data la mia ignoranza, io ne ho uno fatto in asp, sapete tradurlo in asp.net ?
GRAZIEcodice:<% 'Two varibles are passed into the db 'u_input is the value if the user entered a response to 'the vote/poll question....IP is the address of the user u_input=request.form("u_input") u_ip=request.servervariables("remote_addr") ' if the user did not enter anything in the poll on this visit ' then display the poll question and possible choices if u_input = "" then %> <form method="post" action="<%= request.servervariables("script_name") %>"> <table width="138" border="0" align="center"> <tr><td align="left"> <center> <font color="#548F96">Quale è il tuo personaggio preferito ?</font> </center> <input type="radio" name="u_input" value="1">Morpheus <input type="radio" name="u_input" value="2">Neo <input type="radio" name="u_input" value="3">Trinity <input type="radio" name="u_input" value="4">Agente Smith <center><input type="submit" value="Vota" ></center></p> </td></tr></table> </form> <% else' if the user did input a choice on the vote/ballot ' check to see if their ip address is already in the db accessdb="../../mdb-database/votes_db" cn="driver={Microsoft Access Driver (*.mdb)};" cn=cn & "dbq=" & server.mappath(accessdb) set rs = server.createobject("ADODB.Recordset") sql = "select ip from ballot where ip ='" & u_ip & "'" rs.Open sql, cn if rs.eof then ' if the user has not voted previously indicate it been_here_before="No" end if rs.close if been_here_before = "No" then ' Since the user has not voted previously their input ' their vote will be added to the db sql = "insert into ballot (ip, selection" & u_input &") " sql = sql & "values ('" & u_ip & "',1)" rs.Open sql, cn end if 'This will summerize and count the records in the db sql= "select distinctrow sum(selection1) as sum_selection1, " sql= sql & "sum(selection2) AS sum_selection2, sum(selection3) AS sum_selection3, " sql= sql & "sum(selection4) AS sum_selection4, count(*) AS total_votes " sql= sql & "FROM ballot;" rs.Open sql, cn total1=rs ("sum_selection1") total2=rs ("sum_selection2") total3=rs ("sum_selection3") total4=rs ("sum_selection4") count=rs ("total_votes") %>![]()
Tu sei uno schiavo Neo!
Come tutti gli altri sei nato in catene,
sei nato in una prigione che non ha sbarre, che non ha mura, che non ha odore,una prigione per la tua mente!".
Morpheus
prova qui
http://www.asp.net/ControlGallery/de...=35&tabindex=2
ciao![]()
GRAZIE
![]()
Tu sei uno schiavo Neo!
Come tutti gli altri sei nato in catene,
sei nato in una prigione che non ha sbarre, che non ha mura, che non ha odore,una prigione per la tua mente!".
Morpheus
...ne ho trovato un altro:Originariamente inviato da Morpheus2001
GRAZIE
![]()
http://www.aspfree.com/articles/1336,1/articles.aspx
"I video giochi non influenzano i bambini. Voglio dire, se Pac-man avesse influenzato la nostra generazione, staremmo tutti saltando in sale scure, masticando pillole magiche e ascoltando musica elettronica ripetitiva!" (Kristian Wilson, Nintendo Inc., 1989)
Pochi anni dopo naquero le feste rave, la musica techno e l'ecstasy...
:quote:
Grazie anche a te![]()
Tu sei uno schiavo Neo!
Come tutti gli altri sei nato in catene,
sei nato in una prigione che non ha sbarre, che non ha mura, che non ha odore,una prigione per la tua mente!".
Morpheus