Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

choosing a particular db.


lucilue2003

Recommended Posts

i have three identical stores in this format:

 

mysite.com/index.html

mysite.com/UK/

mysite.com/US/

mysite.com/EURO/

 

Each uses a different db because of prices.

 

my index.html page dirrects the user to the proper currency.

 

i tried doing this

 

mysite.com/index.html

<a href=newsite/index.php?currid=UK>UK</a>

<a href=newsite/index.php?currid=US>US</a>

<a href=newsite/index.php?currid=EURO>EURO</a>

 

mysite.com/newsite/index.php

$usedb = $_GET['currid'];

 

mysite.com/newsite/includes/configure.php

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('USE_PCONNECT', 'true');

define('STORE_SESSIONS', 'mysql');

if ($usedb == "EURO")

define('DB_DATABASE', 'EURO');

else if ($usedb == "UK")

define('DB_DATABASE', 'UK');

else

define('DB_DATABASE', 'US');

 

it works only for a minute. once i click on a link, it diverts to the default currency.

can i make it so that if they clik on the link in index.html for the currency, the configure uses that currency and thats it for the durration of his session object?

 

does that make sense

 

thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...