handling vars in prewritten scripts
Posted: Mon Oct 17, 2011 4:53 pm
Ok, let's say I have a script builder, where a manager can build a script for people to read, but he wants variables in it like.... "Thank you for calling $business_name I am $username, How can I help you today?" now those variables have to mean different things depending on who is viewing them, and they are alot more complicated than just getting a username and storing it as a variable. The place has 5 different dba's and multiple scripts for each dba, but they want to define those variables in a management console. What would be the easiest way of going about something like this? My fist though was to build a file called definitions.php and include it in the page depending on what dba they log in to, but upgrading that seems to be a little difficult. I hope I am explaining this correctly, it seems to be a big problem to me, but I am sure someone has faced this before elsewhere. One specific example is if someone logs in as part of one dba the variable $product has to be "Google", but if they log in as a different dba the same variable $product has to be "Bing". For some reason I can't wrap my head around this. Thank you in advance for any help.