Dynamically change web page’s button code in wordpress table after each purchase/subscription

  button, mysql, paypal, php, wordpress

Someone be so kind to help me how to create following. I use WordPress and Elementor theme (free one). I have one php page with subscription paypal button. I insert my button’s generated code. So far so good. What I cannot figure out to do is: I have list of 5 different subscribe buttons codes -therfore each button link has own code – actually only this html code differs for each button:

<input type="hidden" name="hosted_button_id" value="xxxxxxxxxxxxxxx">

The value is different for each button. Now, with each next successfully payment, I need that the php page with a button automatically changes the button code to the next "value" in line of 5 values. After 5 changes, then change to the value of 1st button, and so on, cycling thru 5 buttons/codes again. How to do it to update the php page content in mysql?

Thanks

Source: Ask PHP

LEAVE A COMMENT