PDA

View Full Version : How to get user name out of MIVA pages?


ksmith9
09-14-06, 04:15 PM
Hi,

We use MIVA Merchant for user to login and order products. And we use PHP for other pages. The question is: When the user leaves MIVA page, how do we know the user name? We know there is a session ID in the cookie, how do we map session ID to the user name?

Any help would be really appreciated.

Regards,

Kevin

ILoveHostasaurus
09-14-06, 04:26 PM
You'd need to be using Merchant 5 on mysql; then you could take the session ID and query the s01_baskets table for the cust_id associated with that session, if there is one, then take the cust_id value and query the s01_Customers table to find the person's name. In Merchant 4 the only way to do the same would be to read the dbf files but it's extremely rare to find PHP built with dbase support and even when it is, its dbase support is not able to read all types of files in addition to many hosts having things set up in a way that php would not be able to get into the mivadata directory for security reasons.