Hej..
Jeg er stødt på endnu et problem.
Jeg skal lave en ny formmail, som skal have nogen forskellige valgmuligheder i dropdown menu.
Jeg har denne form i mit html dokument:
<form method="post" action="klubdragt.asp">
<div id="leftside">
<table border="1" cellpadding="5" cellspacing="0" bordercolor="#999999" title="">
<tr>
<td bgcolor="#A9A9A9"> </td>
<td colspan="2">Senior</td>
<td colspan="2">Junior</td>
</tr>
<tr>
<td valign="middle">Del</td>
<td valign="middle"><p>Vejl. pris
<label> </label>
</p></td>
<td valign="middle"><p><strong>Klub pris </strong></p></td>
<td valign="middle"><p>Vejl. pris </p></td>
<td valign="middle"><p><strong>Klub pris</strong></p></td>
</tr>
<tr>
<td><p>Dragt</p></td>
<td><p>799 kr
</p></td>
<td><p><strong>599 kr
<label>
<select name="Senior dragt" size="1" id="select">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</label>
</strong></p></td>
<td><p>699 kr
</p></td>
<td><p><strong>499 kr
<select name="Junior dragt" size="1" id="str4">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
</tr>
<tr>
<td><p>Polo </p></td>
<td><p>349 kr
</p></td>
<td><p><strong>269 kr
</strong><strong>
<select name="Senior polo" size="1" id="str">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
<td><p>299 kr
</p></td>
<td class="style2"><p class="brod"><strong>219 kr
<select name="Junior polo" size="1" id="str5">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
</tr>
<tr>
<td class="style2"><p class="brod">Shorts </p></td>
<td class="style2"><p class="brod">299 kr
</p></td>
<td class="style2"><p class="brod"><strong>219 kr
<select name="Senior shorts" size="1" id="str2">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
<td class="style2"><p class="brod">249 kr
</p></td>
<td class="style2"><p class="brod"><strong>189 kr
<select name="Junior shorts" size="1" id="str6">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
</tr>
<tr>
<td class="style2"><p class="brod">Nederdel </p></td>
<td class="style2"><p class="brod">349 kr
</p></td>
<td class="style2"><p class="brod"><strong>269 kr
<select name="Senior nederdel" size="1" id="str3">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
<td class="style2"><p class="brod">349 kr
</p></td>
<td class="style2"><p class="brod"><strong>269 kr
<select name="Junior nederdel" size="1" id="str7">
<option>Vælg str</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</strong></p></td>
</tr>
</table>
<p>
<label for="f1">Emne</label>
<br />
<input name="emne" type="text" id="f1" value="Klubdragt" size="32" readonly="readonly" />
<br />
<br />
<label for="f2">Navn</label>
<br />
<input id="f2" type="text" name="navn" size="32" />
<br />
<br />
<label for="f3">Telefon:<br />
</label>
<input id="f3" type="text" name="telefon" size="32" />
<br />
<br />
<label for="f4">Email</label>
<br />
<input id="f4" type="text" name="mail" size="32" />
<br />
<br />
<input id="subm" type="submit" value="Send" />
<input type="reset" value="Slet" />
</p>
</div>
<div id="rightside"> <div id="gallery">
<ul>
<li></li>
<li><a href="photos/Klubdragt_09-10_high.jpg" title="Klargøringsdag 2010"> <img src="photos/Klubdragt_09-101.jpg" width="133" height="200"/> </a> </li>
</ul>
</div></div>
<p><span style="display:none">
<label for="subject">Subject</label>
<input type="text" id="subject" name="important" size="32" />
<br />
</span><br />
</p>
</form>
Og min asp kode ser sådan ud:
<%
if request.form("navn") = "" Then
Response.write "Skriv venligst dit navn"
else
if request.form("mail") = "" Then
Response.write "Skriv venligst din email"
else
if request.form("telefon") = "" Then
Response.write "Skriv venligst dit telefonnummer"
else
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "mail.ringstedtennisklub.dk"
Mailer.AddRecipient "Thomas Nielsen","roar@c.dk"
Mailer.AddBcc "Webmaster / Jacob Roar Hansen","webmaster@ringstedtennisklub.dk"
Mailer.Subject = request.Form("emne")
Mailer.FromName = request.Form("navn")
Mailer.FromAddress = "webmaster@ringstedtennisklub.dk"
Mailer.ReplyTo = request.Form("mail")
Mailer.ContentType = "text/html"
msg = "<html><body><span style=""font-family: Calibri, Verdana; font-size: 14px; color: #333333;"">"
msg = msg & "Hej " & request.Form("navn") & "<br><br>"
msg = msg & "Du har valgt at købe disse ting: " & request.Form("Senior klubdragt") & "<br><br>"
msg = msg & "Du har indtastet følgende oplysninger:<br><br>"
msg = msg & "<strong>Email: </strong><br>" & request.Form("mail") & "<br><br>"
msg = msg & "<strong>Tlf.: </strong><br>" & request.Form("tlf") & "<br><br>"
msg = msg & "<strong>Tøj: </strong><br>" & request.Form("tøj") & "<br><br>"
msg = msg & "<strong>Med venlig hilsen</strong><br>Ringsted Tennisklub<br><img src=""
http://www.ringstedtennisklub.dk/Images/RTKlogo_alt.gif"">" msg = msg & "</span></body></html>"
Mailer.BodyText=msg
Mailer.CharSet = 2
if not Mailer.SendMail then
Response.Write "Email blev ikke sendt... Fejlen er: <br>"
Response.Write Mailer.Response
else
Response.Write "Emailen er afsendt, og vil blive besvaret hurtigst muligt.<hr>"
Response.Write "<p>Følgende er blevet indtastet</p><p>" & replace(msg,vbCrLf,"<br>") & "</p>"
end if
end if
end if
end if
%>
Problemet er, at den ikke skriver de oplysninger jeg har indtastet i den mail man får.
Kan du hjælpe med dette?