Currently using DEFINE and need help
Posted: Thu Jan 28, 2010 4:13 am
Hi,
I have a restaurant script that uses the below to place the paypal email address for checking out:
define('PAYPAL_EMAIL', 'your@paypal.com');
This is ok as a constant if I was to use the same Paypal email address throughout, but I am going to have multiple restaurants. For each restaurant it has its own details like name, address, tel no, email etc...
The way it calls each restaurant is as follows:
You first select the city, then you select the street, then you select the restaurant, I have found this in the code:
if ($_REQUEST['rid']) {
$rsr=getSqlRow("SELECT id,cityid,streetid FROM rests WHERE id=".remSpecialChars($_REQUEST['rid'])."");
$_SESSION['cityid']=$rsr['cityid'];
$_SESSION['streetid']=$rsr['streetid'];
$_SESSION['restid']=$rsr['id'];
}
I see also that the email is:
$rs['email']
I would like to know, what I need to do so that it calls the email address and uses that for the PayPal Email on each restaurant and not use the constant DEFINE.
Any ideas will be welcomed?
Kind regards,
bigfoot_3000
I have a restaurant script that uses the below to place the paypal email address for checking out:
define('PAYPAL_EMAIL', 'your@paypal.com');
This is ok as a constant if I was to use the same Paypal email address throughout, but I am going to have multiple restaurants. For each restaurant it has its own details like name, address, tel no, email etc...
The way it calls each restaurant is as follows:
You first select the city, then you select the street, then you select the restaurant, I have found this in the code:
if ($_REQUEST['rid']) {
$rsr=getSqlRow("SELECT id,cityid,streetid FROM rests WHERE id=".remSpecialChars($_REQUEST['rid'])."");
$_SESSION['cityid']=$rsr['cityid'];
$_SESSION['streetid']=$rsr['streetid'];
$_SESSION['restid']=$rsr['id'];
}
I see also that the email is:
$rs['email']
I would like to know, what I need to do so that it calls the email address and uses that for the PayPal Email on each restaurant and not use the constant DEFINE.
Any ideas will be welcomed?
Kind regards,
bigfoot_3000