Tja alla aspälskare...ja behöver hjälp med en lite sak...de e så här att sidan här nedanför som ni ser är ett beställningsblad i en webshop...alltså sista steget innan man skickar iväg ordern...så nu har jag litet problem med att visa vad man valde i kassan alltså i föregående sida....den visar produkternas namn..pris..antal och allt sånt...men den visar inte ( i kassan så väljer man ifall man vill hämta varan i butiken eller frakt..och om man vill betala kontakt eller postförskott eller bankkort ) det e just de sakerna den itne visar....men allt annat som sagt visar den utan problem..pilarna visar vart i koden som raderna inte ska funka.. Vad är det för felmeddelande du får? nope inget felmeddelandet.....och konstigt nog så läggs inget i dbasen..:(..här kommer sidan innan...alltså kassan....den kanske hjälper... <code> Du kan ju testa om det har med stora och små bokstäver att göra. I ditt första exempel lyder SQL frågan enligt följande:hjälp med beställning...
<!-- #Include file="dbcon.asp"-->
<% '-----Kollar så att man är inloggad----------------------------
If Session("KID") = "" Then
Session("From") = "privatkund"
Response.Redirect "login.asp?From=privatkund"
End If
'--------------------------------------------------------------%>
<HTML>
<HEAD>
<link href="stil.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.unnamed1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>
</HEAD>
<BODY class="textbox">
<% '--------------------------------------------------------------
Dim DB, RecSet, Sessionen, TotSumma, ant, prs, Summa, Visa
Sessionen = Session.SessionID
'--------------------------------------------------------------
Set RecSet = Connect.Execute("select * from temptab Where sid = " & Sessionen & "")
'-----Kollar så allt stämmer----------------------------------
IF RecSet.EOF = True Then
Response.Redirect "error.asp?Fel=4"
End IF
'------Börjar visa alla varor----------------------------------%>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="186"><form method="post" action="bestall_ok.asp" name=formular>
<span class="unnamed1"><font size="2">Bekräfta följande varor <strong>(Order
är bindande)</strong> : </font></span>
<table width=500>
<tr>
<td width="66%"><div align="center" class="unnamed1">Vara</div></td>
<td width="11%"><div align="center" class="unnamed1">Antal</div></td>
<td width="13%"><div align="center" class="unnamed1">Pris</div></td>
</tr>
<% Do Until RecSet.EOF %>
<% ant = RecSet("Antal")
prs = RecSet("Pris")
Summa = ant * prs %>
<tr>
<td align="Left"><div align="center" class="unnamed1"><%=RecSet("namn")%></div></td>
<td align="Left"><div align="center" class="unnamed1"><%=RecSet("Antal")%></div></td>
<td align="Left"><div align="center" class="unnamed1"><%=Summa%> kr</div></td>
<td width="5%" class="unnamed1"> <input type="hidden" value="<%=Sessionen%>" name="Sessionen">
</td>
<td width="5%" class="unnamed1"> <input type="hidden" value="tabort" name="andra">
</td>
</tr>
<tr>
<td align="Left" class="unnamed1"> </td>
<td align="Left" class="unnamed1"> </td>
<td align="Left" class="unnamed1"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="Left" class="unnamed1"><div align="center">Meddelande</div></td>
<td align="Left" class="unnamed1"><div align="center">Betalsätt</div></td>
<td align="Left" class="unnamed1"><div align="center">Fraktsätt</div></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="Left" class="unnamed1"> <div align="center">
Här ----> <% =RecSet("medelande")%>
</div></td>
<td align="Left" class="unnamed1"> <div align="center">
Här ---> <% =RecSet("betalsatt")%>
</div></td>
<td align="Left" class="unnamed1"> <div align="center">
Här ---><% =RecSet("fraktsatt")%>
</div></td>
<td> </td>
<td> </td>
</tr>
<% TotSumma=TotSumma + Summa
RecSet.MoveNext
Loop %>
</table>
<p align="center"> <span class="unnamed1">
<input name="Order" type="submit" class="unnamed1" value="Skicka ordern">
</span></p>
</form></td>
</tr>
</table>
</BODY>
</HTML>Sv: hjälp med beställning...
Har du tittat i databasen så att det verkligen läggs till vilket fraktsätt etc. som har valts utav kunden?Sv: hjälp med beställning...
<!--#Include File="dbcon.asp"-->
<HTML>
<link href="stil.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.unnamed1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
.unnamed2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>
<BODY>
<table width="400" border="1" cellpadding="2" cellspacing="2" bordercolor="#006699">
<tr>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% Session("From") = "kassan" %>
<% Dim DB, RecSet, Andra, Visa, Sessionen %>
<% Const FRAKT = 260 %>
<% Const PSKOTT = 80 %>
<% Set RecSet = Server.CreateObject("ADODB.Recordset") %>
<% Sessionen = Session.SessionID %>
<strong>Välkommen till kassan !</strong></font><font size="1">
<% Visa = "SELECT * FROM temptab WHERE SID = " & Sessionen & "" %>
<% RecSet.Open Visa, Connect, 3, 3%>
<% If RecSet.EOF = True Then %>
</font> <font face="Verdana, Arial, Helvetica, sans-serif"> </font></div>
<font face="Verdana, Arial, Helvetica, sans-serif">
<p><font size="1"><strong>Det finns inga varor i kundvagnen gå tillbaka
och välja några produkter.
<% Else %>
</strong> </font></font> <table width="540" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF" class="unnamed1">
<tr>
<td colspan="4"><table width=521 border="0" cellspacing="0">
<tr>
<td width="258" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Namn</font></strong></div></td>
<td width="30" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Antal</font></strong></div></td>
<td width="50" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Pris</font></strong></div></td>
<td colspan="2" align="right" bordercolor="#006699"><div align="center"></div></td>
</tr>
<% Do Until RecSet.EOF %>
<% ant = RecSet("Antal")
prs = RecSet("Pris")
Summa = ant * prs %>
<form method="post" action="kassan_andra.asp">
<tr>
<td height="22" align="Left"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =RecSet("namn")%>
</font></div></td>
<td align="Left" bordercolor="#CCCCCC"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=Antal type="text" class="unnamed2" value="<%=RecSet("Antal")%>" size=3 maxlength=4>
</font></div></td>
<td align="Left" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =Summa %>
kr</font></div></td>
<td width="56" align="right" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=andra type="submit" class="unnamed2" id="andra" value="Ändra">
</font></div></td>
<td width="52" align="right" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=tabort type="submit" class="unnamed2" id="tabort3" value="Tabort">
</font></div></td>
<td width="63"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" value="<% =RecSet("Besk") %>" name="besk">
<input type="hidden" value="<% =RecSet("AID") %>" name="ArtNr">
<input type="hidden" value="<% =Sessionen %>" name="Sessionen">
</font></td>
</form>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font>
<% TotSumma = TotSumma + Summa %>
<% Allt = TotSumma + Summa + PSKOTT + FRAKT %>
<% RecSet.MoveNext %>
<% Loop %>
</table>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr>
<tr>
<td width="138" class="unnamed1"><div align="center"><strong>Fraktsätt</strong></div></td>
<td width="164" bordercolor="#006699"><div align="left"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Summa
varor exkl. moms:</font></strong></div></td>
<td bordercolor="#006699"><div align="right"><strong><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =TotSumma * 0.75%>
kr </font></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td><form name="fraktsatt" method="post" action="">
<div align="center">
<select name="fraktsatt" class="unnamed2" id="fraktsatt">
<option value="Hämtas" selected>Hämtas</option>
<option value="Paket">Paket</option>
</select>
</div>
</form></td>
<td height="15" bordercolor="#006699"><div align="left"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Summa
varor inkl. moms:</font></strong></div></td>
<td height="15" bordercolor="#006699"><div align="right"><strong><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =TotSumma%>
kr </font></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
<% TotSumma = TotSumma + Summa %>
<% Allt = TotSumma + Summa + PSKOTT + FRAKT %>
<td height="15"><div align="right"><strong></strong></div></td>
<td width="70" height="15"><div align="right"><strong><strong></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"><div align="center"><strong>Betalsätt</strong></div></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
Här--><td class="unnamed1"><form name="betalsatt" method="post" action="">
<div align="center">
<select name="select" class="unnamed2">
<option value="Förskottsbetalning">Förskottsbetalning</option>
<option value="Kontant" selected>Kontant</option>
</select>
</div>
</form></td>
<td> </td>
<td width="70"> </td>
<td width="148"> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
Här---> <td colspan="2" bordercolor="#006699"><div align="center">Extra meddelande
till butiken</div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
<td colspan="2" bordercolor="#006699"><form name="form3" method="post" action="">
<textarea name="medelande" cols="35" rows="5" wrap="VIRTUAL" id="medelande"></textarea>
</form></td>
<td> </td>
</tr>
<tr>
<td height="61" colspan="4"><form method="post" action="bestall.asp">
<div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" value="<% =Sessionen%>" name="Sessionen2">
<input name="bestall" type="submit" class="unnamed2" id="bestall3" value="Köp">
</font> </div>
</form>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% End If %>
<% RecSet.Close %>
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tillbaka
till produkterna</font></td>
</tr>
</table>
<br> <table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#006699">
<tr>
<td bordercolor="#FFFFFF"><iframe src="login.asp" name="Loggin" width="400" height="300" scrolling="auto" frameborder="0"></iframe>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<p> </p>Sv: hjälp med beställning...
Här--><td class="unnamed1"><form name="betalsatt" method="post" action="">
</code>
Du har satt action likamed ingenting. Du bör ange var datan ska hanteras någonstans.
Sidan bör istället vara utformad såhär:
<code>
<!--#Include File="dbcon.asp"-->
<HTML>
<link href="stil.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.unnamed1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
.unnamed2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>
<BODY>
<table width="400" border="1" cellpadding="2" cellspacing="2" bordercolor="#006699">
<tr>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% Session("From") = "kassan" %>
<% Dim DB, RecSet, Andra, Visa, Sessionen %>
<% Const FRAKT = 260 %>
<% Const PSKOTT = 80 %>
<% Set RecSet = Server.CreateObject("ADODB.Recordset") %>
<% Sessionen = Session.SessionID %>
<strong>Välkommen till kassan !</strong></font><font size="1">
<% Visa = "SELECT * FROM temptab WHERE SID = " & Sessionen & "" %>
<% RecSet.Open Visa, Connect, 3, 3%>
<% If RecSet.EOF = True Then %>
</font> <font face="Verdana, Arial, Helvetica, sans-serif"> </font></div>
<font face="Verdana, Arial, Helvetica, sans-serif">
<p><font size="1"><strong>Det finns inga varor i kundvagnen gå tillbaka
och välja några produkter.
<% Else %>
</strong> </font></font> <table width="540" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF" class="unnamed1">
<tr>
<td colspan="4"><table width=521 border="0" cellspacing="0">
<tr>
<td width="258" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Namn</font></strong></div></td>
<td width="30" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Antal</font></strong></div></td>
<td width="50" bordercolor="#006699"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Pris</font></strong></div></td>
<td colspan="2" align="right" bordercolor="#006699"><div align="center"></div></td>
</tr>
<% Do Until RecSet.EOF %>
<% ant = RecSet("Antal")
prs = RecSet("Pris")
Summa = ant * prs %>
<form method="post" action="kassan_andra.asp">
<tr>
<td height="22" align="Left"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =RecSet("namn")%>
</font></div></td>
<td align="Left" bordercolor="#CCCCCC"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=Antal type="text" class="unnamed2" value="<%=RecSet("Antal")%>" size=3 maxlength=4>
</font></div></td>
<td align="Left" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =Summa %>
kr</font></div></td>
<td width="56" align="right" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=andra type="submit" class="unnamed2" id="andra" value="Ändra">
</font></div></td>
<td width="52" align="right" bordercolor="#CCCCCC"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name=tabort type="submit" class="unnamed2" id="tabort3" value="Tabort">
</font></div></td>
<td width="63"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" value="<% =RecSet("Besk") %>" name="besk">
<input type="hidden" value="<% =RecSet("AID") %>" name="ArtNr">
<input type="hidden" value="<% =Sessionen %>" name="Sessionen">
</font></td>
</form>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font>
<% TotSumma = TotSumma + Summa %>
<% Allt = TotSumma + Summa + PSKOTT + FRAKT %>
<% RecSet.MoveNext %>
<% Loop %>
</table>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr><br>
<form method="post" action="bestall.asp">
<tr>
<td width="138" class="unnamed1"><div align="center"><strong>Fraktsätt</strong></div></td>
<td width="164" bordercolor="#006699"><div align="left"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Summa
varor exkl. moms:</font></strong></div></td>
<td bordercolor="#006699"><div align="right"><strong><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =TotSumma * 0.75%>
kr </font></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td>
<div align="center">
<select name="fraktsatt" class="unnamed2" id="fraktsatt">
<option value="Hämtas" selected>Hämtas</option>
<option value="Paket">Paket</option>
</select>
</div>
</td>
<td height="15" bordercolor="#006699"><div align="left"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Summa
varor inkl. moms:</font></strong></div></td>
<td height="15" bordercolor="#006699"><div align="right"><strong><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =TotSumma%>
kr </font></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
<% TotSumma = TotSumma + Summa %>
<% Allt = TotSumma + Summa + PSKOTT + FRAKT %>
<td height="15"><div align="right"><strong></strong></div></td>
<td width="70" height="15"><div align="right"><strong><strong></strong></strong></div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"><div align="center"><strong>Betalsätt</strong></div></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="unnamed1">
<div align="center">
<select name="select" class="unnamed2">
<option value="Förskottsbetalning">Förskottsbetalning</option>
<option value="Kontant" selected>Kontant</option>
</select>
</div>
</td>
<td> </td>
<td width="70"> </td>
<td width="148"> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
Här---> <td colspan="2" bordercolor="#006699"><div align="center">Extra meddelande
till butiken</div></td>
<td> </td>
</tr>
<tr>
<td class="unnamed1"> </td>
<td colspan="2" bordercolor="#006699">
<textarea name="medelande" cols="35" rows="5" wrap="VIRTUAL" id="medelande"></textarea>
</td>
<td> </td>
</tr>
<tr>
<td height="61" colspan="4">
<div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" value="<% =Sessionen%>" name="Sessionen2">
<input name="bestall" type="submit" class="unnamed2" id="bestall3" value="Köp">
</font> </div>
</form>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% End If %>
<% RecSet.Close %>
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tillbaka
till produkterna</font></td>
</tr>
</table>
<br> <table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#006699">
<tr>
<td bordercolor="#FFFFFF"><iframe src="login.asp" name="Loggin" width="400" height="300" scrolling="auto" frameborder="0"></iframe>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<p> </p>
</code>Sv: hjälp med beställning...
<code>
Set RecSet = Connect.Execute("select * from temptab Where sid = " & Sessionen & "")
</code>
I ditt andra exempel står det:
<code>
Visa = "SELECT * FROM temptab WHERE SID = " & Sessionen & "" </code>
Du kan ju testa