Skip to content
Advertisement

How to make PHP store information untill purchase is complete?

I am trying to make a form that is for customizing a YouTube background.

anyways. I coded this in HTML and when you hit submit, it sends the information to a PHP file that processes the information and sends it as an e-mail.

This works fine but I need to set it up so it doesn’t send me the e-mail until they purchase it.

How I want it to work is like this.

They fill out the form and click submit, then they are redirected to the URL of my item on PayPal. (If that doesn’t work, there is a buy now button on the PHP site) Either way. They end up on PayPal and purchase the item. Once they purchase it, I will receive the email with the details they requested on the form. If they cancel it, I won’t get the email and give it to them free.

I was wondering if the option PayPal gives to show a site once they complete the purchase would help. It could link to another PHP file possibly? For example, if the first PHP file stores the information and the second PHP that PayPal redirects to will tell it to release the data? I’m not sure.

Advertisement

Answer

okay. I figured it out. All I needed to do was make a PayPal Buy Now button and take some code from it. Then you just put all of the form tags you already have under it.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement