<form action="magza.jsp" method="get">
<table>
<tr>
<td>Merhaba: <b><%= mrb%></b> magzamiza hos geldiniz.</td>
</tr>
<tr>
<td><b>Urunlerimiz</b></td>
</tr>
<tr align="center">
<td><img src="pc.jpg" height="100" width="100"><br><input type="checkbox" name="mal" value="pc" >:Pc</td>
<td><img src="cpu.jpg" height="100" width="100"><br><input type="checkbox" name="mal" value="cpu">:CPU</td>
<td><img src="tel.jpg" height="100" width="100"><br><input type="checkbox" name="mal" value="tel">:Tel</td>
</tr>
<tr><td align="center"><br><br><input type="submit" value="Sepete At"></td></tr>
</table>
<table>
<tr>
<td><b>Sepetim</b></td>
</tr>
<tr>
<td>Urun</td><td>Fiyati</td>
<%
String[] sepet=request.getParameterValues("mal");
java.io.PrintWriter pw =response.getWriter();
for(int i=0;i<sepet.length;i++)
pw.println("<tr><td>"+sepet[i]+"</td></tr>");
%>
</tr>
</table>
</form>
bu kodda sayfa ilk yuklenrken checkboxlarn hic biri isaretlenmedii icin sepet.lenght de hata alıyorum sanırm sorunu tam bende de anlamadm ama böle olabilceni dusunuorm bunu nasl duzelte bilirim
Cant you see the writing on the wall?
"die young gonna die young"
So! Live for today
Tomorrow never comes..
|