Ik heb via hotscripts een script gevonden voor een formulier. ik heb dit bewerkt voor mijn eigen situatie. maar in de e-mail die gegenereert wordt komen de gegevens die ik invul niet te staan, maar alleen de naam van het veld.
wat vergeet ik of doe ik fout?
dit is de html code van het formulier:
deze asp code moet de e-mail vervolgens gaan verzenden:
*edit* ik heb nu alleen de asp code geplaatst waarin volgens mij de gegevens verwerkt moeten worden en de html code ingekort omdat het principe zo ook duidelijk is
wat vergeet ik of doe ik fout?
dit is de html code van het formulier:
HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| <form name="feedbackform" method="post" action="sendmail.asp"> <p>Inschrijfformulier</p> <table width="400" border="0" cellspacing="0" cellpadding="5" height="398"> <tr> <td width="187" valign="top" height="19">Naamvereniging:</td> <td width="213" height="19"> <input name="naamvereniging" type="text" id="Name" size="24"></td> </tr> <tr> <td width="187" valign="top" height="19">Team:</td> <td width="213" height="19"><select size="1" name="jongensmeisjes"> <option value="Meisjes">Meisjes</option> <option value="Jongens">Jongens</option> </select><select size="1" name="ax"> <option value="A1">A1</option> <option value="A2">A2</option> </select></td> </tr> <tr> <td width="187" valign="top" height="19">Medicijnen (diabetes):</td> <td width="213" height="19"> <input name="medicijnen" type="text" id="Web Site0" size="24"></td> </tr> <tr> <td width="187" valign="top" height="19">Overige bijzonderheden:</td> <td width="213" height="19"> </td> </tr> <tr> <td width="187" height="40"> <input name="mail_to" type="hidden" id="mail_to" value="robertjanvdpoel@hotmail.com"> <input name="mail_cc" type="hidden" id="mail_cc"> <input name="mail_bcc" type="hidden" id="mail_bcc"> <input name="mail_subject" type="hidden" id="mail_subject" value="Inschrijving Los in het Bos"> <input name="mail_importance" type="hidden" id="mail_importance" value="2"> <input name="mail_redirect" type="hidden" id="mail_redirect"> <input name="mail_send" type="hidden" id="mail_send" value="y"></td> <td width="213" height="40"><input type="submit" name="Submit" value="Send"></td> </tr> <tr> <td width="187" height="19"> </td> <td width="213" height="19"> </td> </tr> </table> </form> |
deze asp code moet de e-mail vervolgens gaan verzenden:
ASP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| '******************************************************* 'Get all form elements and structure the e-mail '******************************************************* FOR x = 1 TO Request.Form.Count IF Request.Form.Key(x) = "mail_from" OR Request.Form.Key(x) = "mail_to" OR Request.Form.Key(x) = "mail_cc" OR Request.Form.Key(x) = "mail_bcc" OR Request.Form.Key(x) = "mail_subject" OR Request.Form.Key(x) = "mail_importance" OR Request.Form.Key(x) = "mail_redirect" OR Request.Form.Key(x) = "mail_send" OR Request.Form.Key(x) = "Submit" THEN form_variables = form_variables ELSE form_variables = form_variables & Request.Form.Key(x) & ": " & vbcrlf & Request.Form.Item(x) & vbcrlf & vbcrlf END IF NEXT DIM body_text body_text = vbcrlf & "~~~~~" & vbcrlf body_text = body_text & form_subject & vbcrlf body_text = body_text & "~~~~~" & vbcrlf & vbcrlf body_text = body_text & form_variables body_text = body_text & "Sent from: " & vbcrlf & Request.ServerVariables("HTTP_REFERER") & vbcrlf & vbcrlf body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf body_text = body_text & "Script Provided by Dynamic Web Solutions" & vbcrlf body_text = body_text & "http://www.dynamic.ie" & vbcrlf '******************************************************* 'Get values from hidden fields for sending the mail '******************************************************* SET objMail = Server.CreateObject("CDONTS.NewMail") objMail.BodyFormat = 1 'objMail.MailFormat = 1 objMail.From = form_from objMail.To = form_to objMail.CC = form_cc objMail.BCC = form_bcc objMail.Subject = form_subject objMail.Importance = form_importance objMail.Body = body_text objMail.Send 'This line actually sends the e-mail SET objMail = NOTHING |
*edit* ik heb nu alleen de asp code geplaatst waarin volgens mij de gegevens verwerkt moeten worden en de html code ingekort omdat het principe zo ook duidelijk is
[ Voor 70% gewijzigd door GFoAP op 12-11-2003 17:58 ]