<?php
<?
mysql_connect("","","");
mysql_select_db("handphone");
$type=$_GET['type'];
$tampil=mysql_query("select * from nokia where type='$type'");
while ($data=mysql_fetch_array($tampil))
{$no++;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
</head>
<body>
<table width="50%" border="1" align="center">
<tr>
<td colspan="3"><div align="center"><strong>KERANJANG</strong></div></td>
</tr>
<tr>
<td width="35%"><strong>TYPE</strong></td>
<td colspan="2"><strong>
<label>
<input name="type" type="text" class="style1" id="type" value="<? echo $data[0]; ?>" />
</label>
</strong></td>
</tr>
<tr>
<td><strong>HARGA</strong></td>
<td colspan="2"><input name="harga" type="text" class="style1" id="harga" value="<? echo $harga[1]; ?>" /></td>
</tr>
<tr>
<td><strong>JUMLAH</strong></td>
<td colspan="2"><input name="jumlah" type="text" class="style1" id="jumlah" value="<? echo $jumlah; ?>" maxlength="3" /></td>
<?
$jumlah=$_POST['jumlah'];
$total=$data[1]*$jumlah['jumlah'];
?>
</tr>
<tr>
<td><strong>TOTAL</strong></td>
<td colspan="2"><input name="total" type="text" class="style1" id="total" value="<? echo $total; ?>" /></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td height="47"><div align="center"><a href="depan.php"><img src="BUTTON/AddtoCart.gif" width="92" height="25" border="0" /></a></div></td>
<td width="31%"><div align="center"><img src="Batal.jpg" width="89" height="21" /></div></td>
<td width="34%"><label>
</label>
<img src="submit.jpg" width="89" height="21" /></td>
</tr>
</table>
</body>
</html>
<? } ?>
?>
<?php
<?
mysql_connect("","","");
mysql_select_db("handphone");
$type=$_GET['type'];
$tampil=mysql_query("select * from nokia where type='$type'");
while ($data=mysql_fetch_array($tampil))
{$no++;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
</head>
<body>
<table width="50%" border="1" align="center">
<tr>
<td colspan="3"><div align="center"><strong>KERANJANG</strong></div></td>
</tr>
<tr>
<td width="35%"><strong>TYPE</strong></td>
<td colspan="2"><strong>
<label>
<input name="type" type="text" class="style1" id="type" value="<? echo $data[0]; ?>" />
</label>
</strong></td>
</tr>
<tr>
<td><strong>HARGA</strong></td>
<td colspan="2"><input name="harga" type="text" class="style1" id="harga" value="<? echo $harga[1]; ?>" /></td>
</tr>
<tr>
<td><strong>JUMLAH</strong></td>
<td colspan="2"><input name="jumlah" type="text" class="style1" id="jumlah" value="<? echo $jumlah; ?>" maxlength="3" /></td>
<?
$jumlah=$_POST['jumlah'];
$total=$data[1]*$jumlah['jumlah'];
?>
</tr>
<tr>
<td><strong>TOTAL</strong></td>
<td colspan="2"><input name="total" type="text" class="style1" id="total" value="<? echo $total; ?>" /></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td height="47"><div align="center"><a href="depan.php"><img src="BUTTON/AddtoCart.gif" width="92" height="25" border="0" /></a></div></td>
<td width="31%"><div align="center">
<button style="background:url(Batal.jpg);border:0;width:89px;height:21px;text-indent:-999px;overflow:hidden" type="reset">Batal</button>
</div></td>
<td width="34%"><label>
</label>
<button style="background:url(submit.jpg);border:0;width:89px;height:21px;text-indent:-999px;overflow:hidden" type="submit">Submit</button></td>
</tr>
</table>
</body>
</html>
<? } ?>
?>