Painting Contractors Online Help

September 2nd, 2009 at 10:30 am

HTML Tips – Part Three

In our last installment of HTML tips, we went over CSS and how it can make your life a whole lot easier and save you a ton of time. In this installment, we’re going to show you a simple way to be able to take PayPal payments for your products, have instant download and not have to go through any complicated script programming.

If you’ve ever created an encrypted PayPal button, you may or may not have noticed something about it. It uses a form submit using the post method. Now, if that doesn’t mean anything to you then a brief explanation of the difference between post and get is in order. I’ll try to keep this as non technical as possible.

Whenever information needs to be passed using some kind of a form, which is what a PayPal payment button in a sense is, there are only two ways to pass it. One is by using method=get and the other is by using method=post. There is a big difference between the two.

With the GET method, the information is easily seen by the person requesting it because it is passed in a string that is readable. You can actually see it in your browser screen. The good thing about the GET method is that it can be used with simple HTML pages. The bad thing about it is that in the case of a payment button, the person may be seeing information that you or he doesn’t want others to see. And trust me, you don’t want people seeing this stuff.

Okay, with the POST method, the information is not seen. It is encrypted and not even the person who is creating the form can see the information being passed. The bad thing about this is that the POST method does NOT work with plain HTML pages. If you try to use a PayPal payment button with an HTML page, you will get a message, Method Post not allowed. In order to use this method you have to either use a CGI script or a PHP page.

Now, most people don’t know beans about PHP. I learned it when I was first starting to learn web design when I got my certificate. Trust me, PHP is NOT easy. As a matter of fact, it is a royal pain in the rear end, especially since PHP 4 is no longer being supported and PHP 5 is such a big difference, especially in the area of security.

So what’s one to do if they want to do auto delivery with a PayPal payment button?

Here’s a neat trick and it will work as long as you have your own web hosting that comes with PHP support.

Simply take your page, say it’s called index.html, and rename it to index.php. You don’t have to put any PHP code in it. As long as your web host supports PHP, it will execute the page correctly, even though it is JUST HTML. The PayPal payment button will work even though it uses Method=POST because it is seeing a PHP page and not an HTML page.

If this seems like it’s too simple, just try it.

You can thank me later.

Tags:
Powered by Yahoo! Answers