<?php
$login=mysql_connect("localhost","wauhaha_smart",'asd123');
mysql_select_db("wauhaha_smart");
 date_default_timezone_set ("Singapore"); 
$date=date("d-m-Y", time());
$time=date("h:i:sa", time());

$str2 = "SELECT Max(transactionID) FROM paypal_transaction";



						
						$result3 = mysql_query ($str2,$login);
						list($result3)=mysql_fetch_array($result3);
						$rid = ++$result3;
						
						if($rid == "1")
						{
							$rid = "TS000000001";
						}	

			
			mysql_query("insert into paypal_transaction (transactionID,productID,amount,userID,date,time)
						values('$rid','".$_REQUEST['productID']."','".$_REQUEST['price']."','".$_REQUEST['userID']."','$date','$time')");
				
			
			



?>