Jump to content


Photo

why are shopping carts wrote in javascript and not php ?


  • Please log in to reply
2 replies to this topic

#1 ev66

ev66
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 30 August 2006 - 08:42 PM

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

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 30 August 2006 - 08:51 PM

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.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 ev66

ev66
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 30 August 2006 - 08:58 PM

But in javascript, when a button is clicked isnt the page refreshed ?  so
why not just refresh when using a php page ?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users