Hello, I need to know how can I Set and Get variables in Variable Table... As I don't want to use Hard Coded names, because I have to use It more than 1 time in my module. I want to use variables to be Set In variable table once and then to Get them like... DataBase Server Name DataBase Name Directories Name etc.. Please tell me a way to solve this... Thanks
http://uk.php.net/manual/en/function.define.php define("MYVARNAME", 'some name'); define("MYVARDEFAULT", 0); and then everywhere else..... $x = variable_get(MYVARNAME, MYVARDEFAULT); Hello, I need to know how can I Set and Get variables in Variable Table... As I don't want to use Hard Coded names, because I have to use It more than 1 time in my module. I want to use variables to be Set In variable table once and then to Get them like... DataBase Server Name DataBase Name Directories Name etc.. Please tell me a way to solve this... Thanks
Am 09.11.2006 um 12:45 schrieb AjK:
http://uk.php.net/manual/en/function.define.php
define("MYVARNAME", 'some name'); define("MYVARDEFAULT", 0);
and then everywhere else.....
$x = variable_get(MYVARNAME, MYVARDEFAULT);
Wow, variable constants... That's amazing! Konstantin Käfer – http://kkaefer.com/
On 9-Nov-06, at 9:10 AM, Konstantin Käfer wrote:
Am 09.11.2006 um 12:45 schrieb AjK:
http://uk.php.net/manual/en/function.define.php
define("MYVARNAME", 'some name'); define("MYVARDEFAULT", 0);
and then everywhere else.....
$x = variable_get(MYVARNAME, MYVARDEFAULT);
Wow, variable constants... That's amazing!
Next up: we're gonna slice bread! -- James Walker :: http://walkah.net/ :: xmpp:walkah@walkah.net
Hi Asif http://api.drupal.org/api/4.7/function/variable_get http://api.drupal.org/api/4.7/function/variable_set Asif Naseer wrote:
Hello,
I need to know how can I *Set and Get* variables in* Variable* Table... As I don't want to use Hard Coded names, because I have to use It more than 1 time in my module. I want to use variables to be Set In variable table once and then to Get them like...
DataBase Server Name DataBase Name Directories Name etc..
Please tell me a way to solve this...
Thanks
participants (7)
-
adrian rossouw -
AjK -
Asif Naseer -
Derek Wright -
James Walker -
Konstantin Käfer -
sime