<?php session_start();  //Developed by ITechScripts
require 'include/announcements.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php'; // Server compatibility Patch
$productid=$_POST[quick_id]; 
$qty=$_POST[qty]; 
$quick="select * from auction_details where productid=$productid";
$quick_res=mysql_query($quick);
$rec=mysql_fetch_array($quick_res);
$amt=$rec[reserve_price ];
$user_id=$_SESSION[userid];
if($user_id==$rec[user_id])
{
$err= $err_80;
//$err="You are the Seller for this Item.So you Can't buy these item.";
}
else
{
$date1=date('Y-m-d');
 $quick1="insert into site_bids(productid,bidding_date,bidding_amount,user_id,quantity) values($productid,'$date1',$amt,$user_id,$qty) ";
mysql_query($quick1);
$item_sql="select * from auction_details where productid=$productid"; 
 $recordset=mysql_query($item_sql);
 $record=mysql_fetch_array($recordset);
}
require 'themes/quick.tpl';
?>
</body>
</html>
