ev66 Posted August 30, 2006 Share Posted August 30, 2006 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 ?ThnaksEvan Link to comment https://forums.phpfreaks.com/topic/19204-why-are-shopping-carts-wrote-in-javascript-and-not-php/ Share on other sites More sharing options...
Barand Posted August 30, 2006 Share Posted August 30, 2006 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. Link to comment https://forums.phpfreaks.com/topic/19204-why-are-shopping-carts-wrote-in-javascript-and-not-php/#findComment-83121 Share on other sites More sharing options...
ev66 Posted August 30, 2006 Author Share Posted August 30, 2006 But in javascript, when a button is clicked isnt the page refreshed ? sowhy not just refresh when using a php page ? Link to comment https://forums.phpfreaks.com/topic/19204-why-are-shopping-carts-wrote-in-javascript-and-not-php/#findComment-83127 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.