INSERT form data already submitted into database
Moderator: General Moderators
INSERT form data already submitted into database
helllo, i pray someone can help me. I have a simple donation HTML form that collects an amount, firstName, lastName, city, state, zip, email. This HTML form posts to a CyberSource payment gateway php page that collects secure credit card information. I cannot edit this payment gateway php page. After the end user has completed the donation process, they are taken to a receipt php page that echos all form data gathered by my HTML page & the payment gateway php page. I need to insert the echoed form data on the receipt page into a database table. Can anyone help me?
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Thank you for the replies. I am in such need of assistance. The biller, or payment gateway provider, CyberSource, will not provide me with a sript. That was the first thing I asked them for. The data I am collecting involves a Tribute Donation web page, where the end user can donate money in someone elses name & include a message & occasion. Through the CyberSource Business Center I can retrieve standard field values such as f_name, l_name, address, etc.. but I can't retrieve my custom fields/values, such as message, occassion. So I created a custom php receipt page which echoes all the fields/values that I need. The receipt page does work, but I need to store this information for the Merchant or website owner. They need to see the custom field values to carry out the donation.
So I can edit the Receipt page where the field values are echoed. I need to some how take the data from the receipt page & save it some where. Below is my custom receipt page
Thank you for your help. I am obviously a newbie.
Rebecca
So I can edit the Receipt page where the field values are echoed. I need to some how take the data from the receipt page & save it some where. Below is my custom receipt page
Code: Select all
<html>
<head>
</head>
<?php
$billTo_firstName=$HTTP_POST_VARS['billTo_firstName'];
$billTo_lastName=$HTTP_POST_VARS['billTo_lastName'];
$billTo_street1=$HTTP_POST_VARS['billTo_street1'];
$billTo_city=$HTTP_POST_VARS['billTo_city'];
$billTo_state=$HTTP_POST_VARS['billTo_state'];
$billTo_postalCode=$HTTP_POST_VARS['billTo_postalCode'];
$billTo_email=$HTTP_POST_VARS['billTo_email'];
$amount=$HTTP_POST_VARS['amount'];
$message=$HTTP_POST_VARS['message'];
$special=$HTTP_POST_VARS['special'];
?>
<body>
<table cellspacing="2" cellpadding="2" width="600">
<tr>
<td align="center">Field</td>
<td align="center">Value</td>
</tr>
<tr>
<td>billTo_firstName</td>
<td><?php echo $billTo_firstName; ?></td>
</tr>
<tr>
<td>billTo_lastName</td>
<td><?php echo $billTo_lastName; ?></td>
</tr>
<tr>
<td>billTo_street1</td>
<td><?php echo $billTo_street1; ?></td>
</tr>
<tr>
<td>billTo_city</td>
<td><?php echo $billTo_city; ?></td>
</tr>
<tr>
<td>billTo_state</td>
<td><?php echo $billTo_state; ?></td>
</tr>
<tr>
<td>billTo_postalCode</td>
<td><?php echo $billTo_postalCode; ?></td>
</tr>
<tr>
<td>billTo_email</td>
<td><?php echo $billTo_email; ?></td>
</tr>
<tr>
<td>amount</td>
<td><?php echo $amount; ?></td>
</tr>
<tr>
<td>message</td>
<td><?php echo $message; ?></td>
</tr>
<tr>
<td>special</td>
<td><?php echo $special; ?></td>
</tr>
</table>
</body>
</html>Rebecca
If you are refering to the CyberSource manual, I have read it many times. CyberSource does not store the data from my custom fields. If I knew how to do this I wouldn't be asking for help & I certainly do not claim to be a PHP programmer. I am just trying to finish a job for my boss because the programmer who takes care of all PHP programming for the company is in the hospital dying of stomach cancer. His position has not been replaced yet & my company has a deadline.
Is there ANYONE else out there who could help me figure out how to receive & save fields/values from an HTML form that is posted to a payment gateway?
Is there ANYONE else out there who could help me figure out how to receive & save fields/values from an HTML form that is posted to a payment gateway?
and they should not as there's a way to establish a relation between your records and theirs using referenceCode.rebbie wrote:If you are refering to the CyberSource manual, I have read it many times. CyberSource does not store the data from my custom fields.
I'm sorry for your programmer. It's not the reason for me to do his work, though. If you didn't understand the solution I proposed you might have asked for further explanation.rebbie wrote: If I knew how to do this I wouldn't be asking for help & I certainly do not claim to be a PHP programmer. I am just trying to finish a job for my boss because the programmer who takes care of all PHP programming for the company is in the hospital dying of stomach cancer. His position has not been replaced yet & my company has a deadline.
You are correct. I really don't understand the solution you offered. As you can tell, I have never done this before. I was amazed that I got the receipt page to work, if that tells you anything. I work for a small Multi-Media company. My primary job is creating Marketing & Training CDRoms & DVDs, and Business Presentations. I also do the HTML programming, but I know very little about PHP. Our website programmer suddenly became ill. He will have to replaced, but in the meantime I have been asked to try and finish this one project. I have to at least try.
So I will look up referenceCode and establishing a relationship between databases. Am I headed in the right direction? Thank you for your time & suggestions.
r
So I will look up referenceCode and establishing a relationship between databases. Am I headed in the right direction? Thank you for your time & suggestions.
r
I think so. It's been a while since I used CS last time and that code was proprietary. I will need to know what type of integration you use (Simple Order/SCMP/Hosted Order page/something else).rebbie wrote: So I will look up referenceCode and establishing a relationship between databases. Am I headed in the right direction?