The reason it doesn't work may go beyond PHP. You are trying to make an HREF point to an exact location on your hard drive. When the user of your web page clicks the link, they do not have that location on their system so it will fail. Always use relative locations for links. Then once you get that ironed out, skip the defines, just use the variables. Change the code to be: $doc_dir = "/store/"; $image_dir = "/images/"; $control_dir = "/control/";
"<?php echo $control_dir ?>"verify_login.php" <a href="<?php echo $doc_dir ?>">click here</a> and don't forget the 'php' after the <? Jim Hunter -------Original Message------- From: [EMAIL PROTECTED] Date: Wednesday, March 12, 2003 10:51:04 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Define() I am developing an app which needs 3 constants. The value of these constants comes from a database result. This works fine. My problem is that they do not work very well. I am developing on both windows/Linux (depending what I boot into). This is the effect I want $doc_dir = the string of d:/is/clients/client/web/store/ $image_dir = the string of d:/is/clients/client/web/images/ $control_dir = the string of d:/is/clients/client/web/control/ define(HOME_DOC_ROOT,$doc_dir); define(IMAGE_DOC_ROOT,$image_dir); define(CONTROL_DOC_ROOT,$control_dir); The outcome is that 1. I cannot submit pages using action="<? echo CONTROL_DOC_ROOT ?>"verify_login.php" 2. I cannot use links as <a href="<? echo $DOC_HOME_ROOT ?>">click here</a> Has anyone had a lot of use with define and in my scenario. I don't the problem is with the db results, I think it's more of the define(). Like I said above, I am using this on linux as well as windows. ========================== Every chance I get, I try to incorporate Open Source resources into my everyday work. Maybe instead of of paying Microsoft for software, the money can added to my salary. ========================== -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php .