Forum Moderators: buckworks

Message Too Old, No Replies

PHP or Javascript in Paypal button

         

gemini181

7:45 pm on Dec 13, 2005 (gmt 0)

10+ Year Member



Hi all,

I'm preparing detailed specs for someone helping me with e-commerce integration. We are using the Paypal button to pass a varible:

"cookiedata is the variable that you have to get from the cookie.
To get its value from the cookie, you can use either PHP code (if your page has .php extension), or JavaScript function (if it is HTML page)."

I prefer .htm for easy design changes, and have little real experience with either option. Being client-side seems to be an advantage for Javascript. Is there any sound reason why I would "need to use" PHP here, or will this type of Javascript function well, in most browsers?

Thank you very much.

DryFire

9:58 pm on Dec 13, 2005 (gmt 0)

10+ Year Member



Go with php… I would recommend that whenever possible avoid client side scripting. With client side scripting you are depending on the script working on your visitors’ computers. There are so many different combinations of operating systems, browsers, settings, etc. that client side scripting sometimes not work due to the computer of your website visitor. With php and other server side scripting is more robust for this reason.

gemini181

10:02 pm on Dec 13, 2005 (gmt 0)

10+ Year Member



OK, thanks. I'm still not up to speed on viewing .php pages while I work in Dreamweaver (but I'll need to learn quick).