<%@ language="vbscript" %> <% response.buffer = true dim sql, rec, fout, naam, voornaam, email,straat,boodschap,postcode,gemeente,onderwerp if not isempty (request.Form("controle")) then fout = "0" if trim(request.Form("voornaam")) = "" or isnumeric(request.Form("voornaam")) then voornaam = true fout = "1" end if if trim(request.Form("naam")) = "" or isnumeric(request.Form("naam")) then naam = true fout = "1" end if if trim(request.Form("gemeente")) = "" or isnumeric(request.Form("gemeente")) then gemeente = true fout = "1" end if if trim(request.Form("email")) = "" or instr(request.Form("email"), "@") = 0 or instr(request.form("email"), ".") = 0 then email = true fout = "1" end if if trim(request.Form("onderwerp")) = "" or isnumeric(request.Form("onderwerp")) then onderwerp = true fout = "1" end if end if %>
<% if not fout = "0" then %>
<% if fout then %>Fout in formulier, verbeter waar een sterretje staat<% end if %>
Voornaam: " ID="Text1"><% if voornaam then %>*<% end if %>
Naam: " ID="Text2"><% if naam then %>*<% end if %>
Straat: " ID="Text3"><% if straat then %>*<% end if %>
Gemeente: " ID="Text4"><% if gemeente then %>*<% end if %>
Postcode: " ID="Text5"><% if postcode then %>*<% end if %>
Email: " ID="Text6"><% if email then %>*<% end if %>
Onderwerp: " ID="Text7"><% if onderwerp then %>*<% end if %>
Boodschap: <% if boodschap then %>*<% end if %>
<% if not fout = "1" then %><% end if %>
<% else dim x,message,smtp if (request.Form("controle") = "1") then For Each x In Request.Form if (x <> "Submit") then if (x <> "controle") then message = message & "" & x & ": " & "" & Request.Form(x) & "
" end if end if Next set smtp=Server.CreateObject("CDONTS.NewMail") smtp.Host="smtp.priorweb.be" smtp.From=Request.Form("email") smtp.To="tropthaipalms@hotmail.com" smtp.Subject="Contact van Tropthaipalms" smtp.BodyFormat = 0 smtp.Body=message on error resume next smtp.Send if err then response.Write err.Description else Response.redirect("thanks.asp") end if set smtp = nothing end if end if %>