Jump to content

spoody_goon

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

spoody_goon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh geez I see the pointer $this-> is the only part of the variable that requires the $ symbol. I have had another reply from another forum that does not incase the pointer/variable in {}. Is there specific uses that require the use of {} brackets Thanks much.
  2. I am returning to writing in php, I have been refreshing my memory with this tutorial http://www.phpfreaks.com/tutorials/48/1.php A great tutorial but I must be having a brain fart. The problem is that the vaiables I set via $MyHeader->Title = "Log In"; don't get to the functions, they are empty strings at the functions. I suspect I am not using the pointer $this-> correctly but I just am missing the point. Thanks Much Here is the simple class: [code] <?php class clsPrintHeaders { var $Location; var $Title; function fntRedirectHeader() { header("Location: $Location"); } function fntStandardHeader() { $MyString = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"; $MyString .= "<html>\n"; $MyString .= "<head>\n"; $MyString .= "<Title>GoonMail $Title</Title>\n"; $MyString .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n"; $MyString .= "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n"; $MyString .= "<link href=\"default.css\" rel=\"stylesheet\" type=\"text/css\">\n"; $MyString .= "</head>\n"; $MyString .= "<body>\n"; return $MyString; } function fntStandardExit() { ?> </body> </html> <?php } } ?>[/code] Here is the simple usage: [code] require_once "clsHeaders.php"; $MyHeader = new clsPrintHeaders(); $MyHeader->Title = "Log In"; $ThisHeader = $MyHeader->fntStandardHeader(); print $ThisHeader; [/code]
×
×
  • 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.