php - can't sent quantity from catalog to shopping cart -
i have problem in web project (shopping cart). can't send quantity on product order screen shoot web
when click 'beli' can't send quantity database.
this piece script:
<td align="left"> <font face="verdana" size="2" color="#666666"> <select name='jml'> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> </select> </font> </td> <td align="center"> <a href="#" title="klik untuk membeli" onclick="konfirm(<? echo $id_produk; ?>)"><img src="./img/beli.jpg" border="0"></a> </td>
and php piece script in other file.
if($_session['user_id']) { include "./include/conn.php"; $iduser=$_session['user_id']; $idbrg=$_get['id_produk']; $jml=$_get['jml']; $tanggal; //check status of customer $view=mysql_db_query($db,"select * laporan iduser='$iduser'",$koneksi); while($row=mysql_fetch_array($view)){ $status=$row['status']; } ... $query=mysql_db_query($db,"insert keranjang_belanja(jumlah,id_produk,id_user,tanggal) values('$jml','$idbrg','$iduser','$tanggal')",$koneksi);
please me fix it. , i'm sory english limitation
first of using wrong function
mysql_db_query
use
mysql_query
instead
something this
$view=mysql_query("select * laporan iduser='$iduser'");
secondly method using in form or post?
Comments
Post a Comment