1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Fatal Error in Help Desk

Discussion in 'PHP' started by docquesting, Jan 16, 2006.

  1. #1
    Hi, I get a Fatal Error in only one place in this script I just installed. I click on Company details in the admin section and I get the following.

    Fatal error: Using $this when not in object context in /home/docquest/public_html/helpdesk/administration/mycompany.php on line 85

    Here is the code above and below it which was not changed at all from the time of upload and install and original form. Is there something I am not changing that I should so that I will not get the error?

    
    #83  $block1 = new block();
    #84
    #85  echo '<a name="' . $this->form . 'Anchor"></a>';
    #86  echo '<form accept-charset="UNKNOWN" method="POST" 
    Code (markup):
     
    docquesting, Jan 16, 2006 IP
  2. rossriley

    rossriley Guest

    Messages:
    25
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can't be sure without seeing the rest of your script but the command..
    $this->form
    can only be used inside a class.

    Therefore if further up your code there isn't a line that starts...
    class ClassName {

    or similar then that is what's causing the problem.

    As I said post the whole script and I can have a look.
     
    rossriley, Jan 17, 2006 IP