hi every body
my database
1st table =>(basket)
{b_id | basket_name | qu | basket_price | active | date_insert}
2nd table => (member)
{id | fileid | name | etc>>}
3d table =>(users)
{id | name | pass }
4nd table =>(operationlog)
{log_id | idno | fileid | basket_name | basket_price | user | }
my code is :
<form action="?p=addlog" method="post">
<div>
<?php
$q=mysql_query("SELECT * FROM `basket` where active = 1 and qu >=1 ");
if(mysql_num_rows($q)){
while($m=mysql_fetch_assoc($q))
{
?>
<td> <input type="checkbox" name="basket[]" value="<?echo $m["basket_name"] ;?>" />
<?
echo "<span>". $m["basket_name"]."</span> ";
}
?>
<?
}
?>
</div></br>
<input type="submit" value="SEND" />
</form>
<?
if($_GET[p]=="addlog"){
$reqtime=date("h:i:s");
foreach($_POST["basket"] as $basket1)
{
if(mysql_query("insert operationlog set
idno='$_POST[curid]',fileid='$_POST[curfid]',basket_name='$basket1',basket_price='$basket1',username='{$_SESSION['loginname']}'"))
?>
it works fine but basket_price (basket_price='$basket1') dosnt send value , it send value = 0
so i know "foreach($_POST["basket"] as $basket1)" is the problem >
thanks