Chris Payne wrote:

I'm using PHP and MySQL in a shopping cart system but the client wants it so
that when you add an item to the cart the page doesn't refresh and we all
know with PHP the page MUST refresh in order to execute the MySQL query.  Is
it possible, maybe with javascript? That I can talk to MySQL without having
to have the page itself refresh when they add the items to the cart?  This
is really a pain as the system was basically finished and now I'm told they
don't want the page to refresh and they see other sites that don't refresh -
sigh.  If it can be done with Javascript, do you have a sample of how I can
use PHP, Javascript and MySQL together to achieve this please?

Ask them if they're willing to lose any business at all, because any solution (XMLHttpRequest, hidden frame, cookies to store it until page refresh, etc.) will or could run into compatibility problems, and it's possible users won't be able to check out if they're using older browsers.

Also, it's really too late now, but you should try to demo these things early and be firm about having things stated as early in the process as possible, so you can change to meet their final request (which always differs from their initial) earlier rather than later. Bottom line is this is probably a new request, but you may have to eat it depending on your situation / relationship / contract.

- Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to