hi m writing a program n storing a values in session but one of them i.e of prie is not working . can any1 tel where m i wrong
$name=$_POST['P_list'];
$quantity=$_POST['quantity'];
$query= "SELECT product_name, unit_price FROM product WHERE product_name='$name'";
$result=mysql_query($query);
if ($result)
{
if (mysql_num_rows($result)==1)
{
$orders = mysql_fetch_assoc($result);
$one_price=$orders['unit_price'];
$_SESSION['product_name']=$orders['product_name'];
$_SESSION['unit_price']=$orders['unit_price'];
$_SESSION['quantity']=$quantity;
$price=$one_price*$quantity;
echo " the total amount to be paid for your given order will be:";
echo "$price";
$_SESSION['price']=$price;
}
else
{
echo " No record found";
}
}
else
{echo "database failed";
}