Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Issue With Database

$
0
0

Can someone please help me figure out how to store customer  payment info into a databse. below is the sricpt i have written but i am not able to get the infomation into the database so i see the information for completed, pending, failed and cancel.

 

 

 
$invoice->getStatus();
$invoice->getCustomData("ticketnum");
if($invoice->getStatus()=="completed") 
{
$qry='update pcustomerorder set flag = "1" where pcustomerorderid ="'.$_SESSION["orderid"].'"';
$result=mysql_query($qry);
header("Location: userprofile.php?msg=".$invoice->getStatus());
}
/*else if($invoice->getStatus()=="pending")
{
$qry='update pcustomerorder set flag = "2" where pcustomerorderid ="'.$orderid.'"';
$result=mysql_query($qry);
header("Location: userprofile.php?msg=".$invoice->getStatus());
}*/
else if($invoice->getStatus()=="canceled")
{
$qry='update pcustomerorder set flag = "0" where pcustomerorderid ="'.$_SESSION["orderid"].'"';
$result=mysql_query($qry);
header("Location: userprofile.php?msg=".$invoice->getStatus());
}
else if($invoice->getStatus()=="fail")
{
$qry='update pcustomerorder set flag = "0" where pcustomerorderid ="'.$_SESSION["orderid"].'"';
$result=mysql_query($qry);
header("Location: userprofile.php?msg=".$invoice->getStatus());
}

Viewing all articles
Browse latest Browse all 13200

Trending Articles