Zubrag.com
June 19, 2018, 12:01:47 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: $this problem  (Read 4236 times)
martinu
Newbie
*
Posts: 2


« on: January 12, 2010, 03:03:26 PM »

I get the following error:Fatal error: Using $this when not in object context in /home7/microca5/public_html/signup_form.php on line 19

I placed the signup form inside of my own page to make it look nicer. Is there anything I can do to eliminate these types of errors? By the way, my include header only brings in drop down menus and not the full header. That is hard coded into the page as you can see.

Here is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Begin Header-->
<title>Microcapsadviser Registration Form</title>
<meta name="description" content="Receive microcap stock news ahead of the pack. Signup for free alerts.">
 <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
 <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<?php include("header.php"); ?>
<table width="968" border="0" align="center">
  <tr>
    <td><!-- Begin Signup Form-->
    <form method="post">
      <h3>User Registration Form</h3>
      <p>Registered users obtain access to the restricted part of our website. This is were we post breaking news that could have an immediate impact on a stock.</p>
      <p>In addition, we will email you breaking information and give you a &quot;heads-up&quot; in advance of an important event. Do not underestimate how valuable these emails can be. Remember, for certain new issues, we are the first to release company related news. All registered users will get email alerts.<br>
      <font color="red"><?php echo $this->error; ?></font><br />
      Login:<br />
      <input type='input' name='access_login' value='<?php echo $this->login ?>'/>
      <br />
      Password:<br />
      <input type="password" name="access_password" />
      <?php if (USE_EMAIL && !LOGIN_AS_EMAIL) echo "<br />Email:<br /><input type='input' name='access_email' value='$this->email' />"; ?>
      </p>
      <p></p>
      <input type="submit" name="access_submit" value="Sign up" />
    </form>
  </tr>
</table>
<?php include("footer.php"); ?>

Logged
martinu
Newbie
*
Posts: 2


« Reply #1 on: January 12, 2010, 04:51:30 PM »

I get the same error message with the standard signup form. I find this online but do not know enough about coding php to tell if it is meaningful. My server uses PHP5

"you were allowed to use $this outside of classes in PHP4, but PHP5 does not allow it."

Does this have any meaning to anyone, such that it can help me with this problem?
Logged
1ststop
Newbie
*
Posts: 30


« Reply #2 on: March 14, 2010, 05:05:55 AM »

I tried to write an explanation of where you are going wrong but the form won't submit because it's over 1000 characters. I shortenned it but it still wouldn't submit, so I guess you're on your own. Sorry.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC