How do I Execute HTML code (display PayPal button) that has been retrieved from a MySQL database via PHP?

Avatar
  • Answered
I am building a custom cms for a customer. customer needs to paste PayPal button code into the cms and have the code execute & display the PayPal button on the web page. Currently, the only way the code is executed and displaying the button is if I go into cPanel and paste the code directly into the database via php myadmin. Otherwise, the code is just displayed on the web page, not executed. This is just a testing site so far, so I will provide user name and password so you can recreate the problem. WEB PAGE http://qwebtest3.biz/specials.php To login, click Admin at the bottom. USER NAME melissa PASSWORD webgirl33. Click on Specials button. Click Edit next to any item. then save the changes and return to Specials page to see the results. You can also see the results out on the web page by refreshing your browser. I will create several items directly inside the cPanel so you have plenty to play with.
Avatar
Scott
Hello Qwebdesigns,

In looking at the page, I see the majority of the paypal buttons showing up. There is one instance where it simply gives code. Checking the source code of that shows that it is not using the actual tags, but has replaced them so it displays instead of interprets. You will want to check the database fields themselves to see how the data is being saved and ensure it is saving the code correctly and not in a converted mode.

I hope this answers your question. If you have any more questions or information specific to the issue please leave a comment below so we can further assist you.

Best Regards,
Scott M