Jump to content

webbiz

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

webbiz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, Thanks for your reply. You are right but I was using that because I’m trying to includes files under a domain name into a file under a sub domain name. On a test page ‘../xxxx/ works but not on the main index page. I may just have to do some rethinking now that I’m on the right track. Thanks heaps.
  2. Hi, I’m having trouble creating a class instance. The code I’m using works on another server so I’m thinking it must be some settings that are wrong. The error message I get is: Fatal error: Class 'Test' not found in /mounted-storage/home30a/sub001/sc15979-ERWX/XXXdomainNameXXX/INDEX/test.php on line 6 The class include file seems to get included into the calling file OK. Example code of both the test class and calling page are bellow. I hope someone can help me out here as it is bound to be some simple setting or something. Thanks, Lance The test code I have: Class: <?php class Test{ public function __construct(){ ?> <script type="text/javascript">alert('test class');</script> <?php } } ?> Caller: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php include_once('http://www.THEDOMAINNAME/includes/classes-LIT/test.php'); // create class instance $testx = new Test(); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> </body> </html>
  3. Hi thanks. I did work it out once I got some sleep. Thanks again [!--quoteo(post=333513:date=Jan 6 2006, 12:09 AM:name=degsy)--][div class=\'quotetop\']QUOTE(degsy @ Jan 6 2006, 12:09 AM) 333513[/snapback][/div][div class=\'quotemain\'][!--quotec--] $totalRows_Recordset_access_level You are comparing to the wrong variable. totalRows is just that. It is the count of rows found. If you want to check against the value then it would be something like <?php if ($row_access_level['user_level'] == "reg_lev_user_1")
  4. I need to show information if a recordset is = to a set MySQL table varchar value. In this case the value is “reg_lev_user_1". The following code works to show if there is a record: // code start <?php if ($totalRows_Recordset_access_level > 0) { // Show if recordset not empty ?> Test text <?php } // Show if recordset not empty ?> // code end However, when I adapt the above code to the code below it does not work. In fact the box around the ‘test text’ with the heading ‘Show If’ is replaced with a PHP tag (not sure what they are called). I have tried using single, double and no quotation marks around the text variable and I have echoed the variable on the same page to make sure it is correct. Could someone tell me what I’m doing wrong with this code? // code start <?php if ($totalRows_Recordset_access_level == "reg_lev_user_1") { // Show if recordset not empty ?> <p>Test text </p> <?php } // Show if recordset not empty ?> // code end
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.