Jump to content

Archived

This topic is now archived and is closed to further replies.

ev66

why are shopping carts wrote in javascript and not php ?

Recommended Posts

I am writing a shopping cart app using php but have noticed most shopping cart apps are wrote in javascrirt, whats the advantages of javascript ? isnt php easier and more secure ?

Thnaks
Evan

Share this post


Link to post
Share on other sites
PHP runs on the server so if you want something to happen on the client PC is response to an event (such as a user mouse click) you need to use javascript, which runs client-side.

Share this post


Link to post
Share on other sites
But in javascript, when a button is clicked isnt the page refreshed ?  so
why not just refresh when using a php page ?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.