HTML beginner |
|
Probleem met formulier verzenden.
Reserveren.html
<html>
<head>
</head>
<body>
<form name="reserveringen via nederlandse website" action="mail.asp" method="post">
<input name="mail-to" type="hidden" value="EMAILADRES INVOEREN">
<input name="TGsubject" type="hidden" value="informatieformulier van website">
<input name="TGredirect" type="hidden" value="bedankt.html">
<input name="TGorder" type="hidden" value="realname, adres, postcode, plaats, land, telefoon, fax,e-mail, kenteken auto, aankomstdag, aankomstdag indien bezet, vertrekdag, vertrekdag indien bezet, aantal volwassenen, aantal kinderen vanaf 2 jaar, caravan, tent, vouwwagen, camper, hond, bijzettentje, bungalow huren, arrangement, opmerkingen">
<table border="0" cellpadding="0" cellspacing="0" width="485">
<tr>
<td width="200">Naam:</td>
<td width="245"><input type="text" name="realname" size="24"></td>
</tr>
<tr>
<td width="200">Adres:</td>
<td width="245"><input type="text" name="adres" size="24"></td>
</tr>
<tr>
<td width="200">Postcode:</td>
<td width="245"><input type="text" name="postcode" size="24"></td>
</tr>
<tr>
<td width="200">Plaats:</td>
<td width="245"><input type="text" name="plaats" size="24"></td>
</tr>
<tr>
<td width="200">Land:</td>
<td width="245"><input type="text" name="land" size="24"></td>
</tr>
<tr>
<td width="200">Telefoon:</td>
<td width="245"><input type="text" name="telefoon" size="15"></td>
</tr>
<tr>
<td width="200">Fax:</td>
<td width="245"><input type="text" name="fax" size="15"></td>
</tr>
<tr>
<td width="200">E-mail</td>
<td width="245"><input type="text" name="e-mail" size="24"></td>
</tr>
<tr>
<td width="200">Kenteken auto:</td>
<td width="245"><input type="text" name="kenteken auto" size="15"></td>
</tr>
<tr>
<td width="200"><br>
<br>
<br>
</td>
<td width="240"></td>
</tr>
<tr>
<td width="200">Aankomst datum: </td>
<td width="240"><input type="text" name="aankomstdag" size="10" value="dd - mm - yy"></td>
</tr>
<tr>
<td width="200">Indien bezet:</td>
<td width="240"><input type="text" name="aankomstdag indien bezet" size="10" value="dd - mm - yy"></td>
</tr>
<tr>
<td colspan="2"><br>
<font color="#324395">(Alleen per week van zaterdag tot zaterdag in de periode van 30/6 tot 18/8)<br>
<br>
<br>
</font></td>
</tr>
<tr>
<td width="200">Vertrek datum:</td>
<td width="240"><input type="text" name="vertrekdag" size="10" value="dd - mm - yy"></td>
</tr>
<tr>
<td width="200">Indien bezet:</td>
<td width="240"><input type="text" name="vertrekdag indien bezet" size="10" value="dd - mm - yy"></td>
</tr>
<tr>
<td width="200"><br>
<br>
</td>
<td width="240"></td>
</tr>
<tr>
<td width="200">Aantal volwassenen: </td>
<td width="240"><input type="text" name="aantal volwassenen" size="3"></td>
</tr>
<tr>
<td width="200">Aantal kinderen vanaf 2 jaar:</td>
<td width="240"><input type="text" name="aantal kinderen vanaf 2 jaar" size="3"></td>
</tr>
<tr>
<td width="200"><br>
<br>
<br>
</td>
<td width="240"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="485">
<tr>
<td><br>
Wij komen met een:<br>
<br>
<input type="checkbox" value="checkboxValue" name="caravan"> caravan - <input type="checkbox" value="checkboxValue" name="tent"> tent - <input type="checkbox" value="checkboxValue" name="vouwwagen"> vouwwagen - <input type="checkbox" value="checkboxValue" name="camper"> camper - <input type="checkbox" value="checkboxValue" name="hond"> hond - <input type="checkbox" value="checkboxValue" name="bijzettentje"> bijzettentje</td>
</tr>
<tr>
<td><br>
<input type="checkbox" value="checkboxValue" name="bungalow huren"> aanvinken indien u een kampeerbungalow wilt huren.</td>
</tr>
<tr>
<td><br>
Wij willen het volgende arrangement boeken: <select name="arrangement" size="1">
<option value="voorjaarsarrangement">voorjaarsarrangement</option>
<option value="paasarrangement">paasarrangement</option>
<option value="mei-arrangement">mei-arrangement</option>
<option value="juni-arrangement">juni-arrangement</option>
<option value="nazomerarrangement">nazomerarrangement</option>
<option value="herfstarrangement">herfstarrangement</option>
</select><br>
</td>
</tr>
<tr>
<td><br>
Opmerkingen:<br>
<br>
<textarea name="opmerkingen" cols="40" rows="4"></textarea></td>
</tr>
<tr>
<td><br>
<input type="submit" name="submitButtonName" value="aanvraag verzenden"></td>
</tr>
</table>
</form>
</body>
</html>
<html> <head> </head> <body> <form name="reserveringen via nederlandse website" action="mail.asp" method="post"> <input name="mail-to" type="hidden" value="EMAILADRES INVOEREN"> <input name="TGsubject" type="hidden" value="informatieformulier van website"> <input name="TGredirect" type="hidden" value="bedankt.html"> <input name="TGorder" type="hidden" value="realname, adres, postcode, plaats, land, telefoon, fax,e-mail, kenteken auto, aankomstdag, aankomstdag indien bezet, vertrekdag, vertrekdag indien bezet, aantal volwassenen, aantal kinderen vanaf 2 jaar, caravan, tent, vouwwagen, camper, hond, bijzettentje, bungalow huren, arrangement, opmerkingen"> <table border="0" cellpadding="0" cellspacing="0" width="485"> <tr> <td width="200">Naam:</td> <td width="245"><input type="text" name="realname" size="24"></td> </tr> <tr> <td width="200">Adres:</td> <td width="245"><input type="text" name="adres" size="24"></td> </tr> <tr> <td width="200">Postcode:</td> <td width="245"><input type="text" name="postcode" size="24"></td> </tr> <tr> <td width="200">Plaats:</td> <td width="245"><input type="text" name="plaats" size="24"></td> </tr> <tr> <td width="200">Land:</td> <td width="245"><input type="text" name="land" size="24"></td> </tr> <tr> <td width="200">Telefoon:</td> <td width="245"><input type="text" name="telefoon" size="15"></td> </tr> <tr> <td width="200">Fax:</td> <td width="245"><input type="text" name="fax" size="15"></td> </tr> <tr> <td width="200">E-mail</td> <td width="245"><input type="text" name="e-mail" size="24"></td> </tr> <tr> <td width="200">Kenteken auto:</td> <td width="245"><input type="text" name="kenteken auto" size="15"></td> </tr> <tr> <td width="200"><br> <br> <br> </td> <td width="240"></td> </tr> <tr> <td width="200">Aankomst datum: </td> <td width="240"><input type="text" name="aankomstdag" size="10" value="dd - mm - yy"></td> </tr> <tr> <td width="200">Indien bezet:</td> <td width="240"><input type="text" name="aankomstdag indien bezet" size="10" value="dd - mm - yy"></td> </tr> <tr> <td colspan="2"><br> <font color="#324395">(Alleen per week van zaterdag tot zaterdag in de periode van 30/6 tot 18/8)<br> <br> <br> </font></td> </tr> <tr> <td width="200">Vertrek datum:</td> <td width="240"><input type="text" name="vertrekdag" size="10" value="dd - mm - yy"></td> </tr> <tr> <td width="200">Indien bezet:</td> <td width="240"><input type="text" name="vertrekdag indien bezet" size="10" value="dd - mm - yy"></td> </tr> <tr> <td width="200"><br> <br> </td> <td width="240"></td> </tr> <tr> <td width="200">Aantal volwassenen: </td> <td width="240"><input type="text" name="aantal volwassenen" size="3"></td> </tr> <tr> <td width="200">Aantal kinderen vanaf 2 jaar:</td> <td width="240"><input type="text" name="aantal kinderen vanaf 2 jaar" size="3"></td> </tr> <tr> <td width="200"><br> <br> <br> </td> <td width="240"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="485"> <tr> <td><br> Wij komen met een:<br> <br> <input type="checkbox" value="checkboxValue" name="caravan"> caravan - <input type="checkbox" value="checkboxValue" name="tent"> tent - <input type="checkbox" value="checkboxValue" name="vouwwagen"> vouwwagen - <input type="checkbox" value="checkboxValue" name="camper"> camper - <input type="checkbox" value="checkboxValue" name="hond"> hond - <input type="checkbox" value="checkboxValue" name="bijzettentje"> bijzettentje</td> </tr> <tr> <td><br> <input type="checkbox" value="checkboxValue" name="bungalow huren"> aanvinken indien u een kampeerbungalow wilt huren.</td> </tr> <tr> <td><br> Wij willen het volgende arrangement boeken: <select name="arrangement" size="1"> <option value="voorjaarsarrangement">voorjaarsarrangement</option> <option value="paasarrangement">paasarrangement</option> <option value="mei-arrangement">mei-arrangement</option> <option value="juni-arrangement">juni-arrangement</option> <option value="nazomerarrangement">nazomerarrangement</option> <option value="herfstarrangement">herfstarrangement</option> </select><br> </td> </tr> <tr> <td><br> Opmerkingen:<br> <br> <textarea name="opmerkingen" cols="40" rows="4"></textarea></td> </tr> <tr> <td><br> <input type="submit" name="submitButtonName" value="aanvraag verzenden"></td> </tr> </table> </form> </body> </html>
bedankt.htm
<html>
<head>
</head>
<body>
Er is een ontvangstbevestiging naar uw E-mail adres verstuurd.
</body>
</html>
<html> <head> </head> <body> Er is een ontvangstbevestiging naar uw E -mail adres verstuurd .</body> </html>
mail.asp
<%
Response.Buffer = True
Set objFM = CreateObject("Scripting.Dictionary")
Set objMailx = CreateObject("CDONTS.Newmail")
Set objMailx = Nothing
%>
<%
strRcpt = Trim(request("mail-to"))
strDefFrom = Trim(request("e-mail"))
if strDefFrom = "" or len(strDefFrom) = 0 then
strDefFrom = "Email adres invoeren"
end if
%>
<%
ParseForm
strOutX = SeqForm
If Len(strOutX) < 1 Then
strOutX = FormToString
End If
strSubject = strDefSubject
If objFM.Exists("TGsubject") Then
strSubject = objFM.Item("TGsubject")
End If
strFrom = strDefFrom
If Len(strFromVar) > 0 Then
If objFM.Exists(strFromVar) Then strFrom = objFM.Item(strFromVar)
End If
SendMail strFrom,strRcpt,strSubject,strOutX
If objFM.Exists("TGredirect") = True Then
If Len(objFM.Item("TGredirect")) > 0 Then
Response.redirect(objFM.Item("TGredirect"))
Response.End
End If
End If
%>
<%
Function IsValidEmail(Email)
Dim Temp,Temp2
End Function
%>
<%
Function SendMail(From,Rcpt,Subject,Body)
Trim(From)
Set objMailer = CreateObject("CDONTS.Newmail")
objMailer.From = From
objMailer.To = Rcpt
objMailer.Subject = Subject
objMailer.Body = Body
objMailer.Send
Set objMailer = Nothing
End Function
%>
<%
Function ParseForm()
For Each Item in Request.Form
If objFM.Exists(Item) Then
objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item)
Else
objFM.Add Item,Request.Form(Item)
End If
Next
For Each Item in Request.QueryString
If objFM.Exists(Item) Then
objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item)
Else
objFM.Add Item,Request.QueryString(Item)
End If
Next
End Function
%>
<%
Function SeqForm()
Dim Temp,strTmp,strOrder,strOut
If objFM.Exists("TGorder") = False Then
Exit Function
ElseIf isEmpty(objFM.Item("TGorder")) Then
Exit Function
End If
strOrder = objFM.Item("TGorder")
Temp = Split(strOrder,",",-1,1)
For Each strTmp in Temp
If objFM.Exists(strTmp) Then
strOut = strOut & strTmp & "=" & objFM.Item(strTmp) & Chr(10)
End If
Next
SeqForm = strOut
End Function
%>
<%
Function FormToString()
Dim strOut
strKeys = objFM.Keys
strValues = objFM.Items
For intCnt = 0 To objFM.Count -1
strOut = strOut & strKeys(intCnt) & "=" & strValues(intCnt) & Chr(10)
Next
FormToString = strOut
End Function
%>
<%
Function ReportError(strMess)
Response.Clear
%>
<%
Credit
Response.End
End Function
%>
<%Function Credit%>
<%End Function%>
<% Response.Buffer = True Set objFM = CreateObject("Scripting.Dictionary") Set objMailx = CreateObject("CDONTS.Newmail") Set objMailx = Nothing %> <% strRcpt = Trim(request ("mail-to"))strDefFrom = Trim(request ("e-mail"))if strDefFrom = "" or len(strDefFrom) = 0 then strDefFrom = "Email adres invoeren" %> <% ParseForm strOutX = SeqForm If Len(strOutX) < 1 Then strOutX = FormToString strSubject = strDefSubject If objFM.Exists("TGsubject") Then strSubject = objFM.Item("TGsubject") strFrom = strDefFrom If Len(strFromVar) > 0 Then If objFM.Exists(strFromVar) Then strFrom = objFM.Item(strFromVar) SendMail strFrom,strRcpt,strSubject,strOutX If objFM.Exists("TGredirect") = True Then If Len(objFM.Item("TGredirect")) > 0 Then Response.redirect(objFM.Item("TGredirect")) %> <% Function IsValidEmail(Email) Dim Temp,Temp2 %> <% Function SendMail(From,Rcpt,Subject,Body) Set objMailer = CreateObject("CDONTS.Newmail") objMailer.From = From objMailer.To = Rcpt objMailer.Subject = Subject objMailer.Body = Body objMailer.Send Set objMailer = Nothing %> <% Function ParseForm() For Each Item in Request .Form If objFM.Exists(Item) Then objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item) Else objFM.Add Item,Request.Form(Item) For Each Item in Request .QueryString If objFM.Exists(Item) Then objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item) Else objFM.Add Item,Request.QueryString(Item) %> <% Function SeqForm() Dim Temp,strTmp,strOrder,strOut If objFM.Exists("TGorder") = False Then ElseIf isEmpty(objFM.Item("TGorder")) Then strOrder = objFM.Item("TGorder") Temp = Split(strOrder ,",",-1,1) If objFM.Exists(strTmp) Then strOut = strOut & strTmp & "=" & objFM .Item (strTmp ) & Chr(10)SeqForm = strOut %> <% Function FormToString() Dim strOut strKeys = objFM.Keys strValues = objFM.Items For intCnt = 0 To objFM .Count -1 strOut = strOut & strKeys (intCnt ) & "=" & strValues (intCnt ) & Chr(10)FormToString = strOut %> <% Function ReportError(strMess) Response.Clear %> <% Credit %> <%Function Credit%>
Het probleem is dat ik alleen de naam en de email doorkrijg in de mail. Verder ontgvang ik niets van het formulier. En dit heb ik zelf gescript. Wat doe ik fout? Kan iemand het voor me oplossen.
PS: (opmaak ziet er niet uit, maar heb weggehaald vanwege grootte script, en ftp van mij is niet goed meer. Dus moest hier wel posten.)
|