including class function inside a non class function
Posted: Sun May 08, 2005 8:48 am
i have a function on a page but i need to put in a result from a class function that i define earlier in the script. all works perfectly but when i put the class function thing inside a non class function i get a error. here is my code
and i get this error:
Fatal error: Call to a member function on a non-object in /home/users/andrew/public_html/cv/edit/education_3.php on line 90
Code: Select all
function NewSecondary($edu_id)
{
?>
<table border="0">
<form action="education_3.php" method="post">
<input type="hidden" name="edu_ty" value="1">
<input type="hidden" name="edu_id" value="<? echo $edu_id; ?>">
<tr>
<td>
<? $lang->DoL('SCHOOL_NAME'); ?>
</td>
<td>
<input type="text" name="edit[sec_school_name]" size="">
</td>
</tr>
<tr>
<td>
<? $lang->DoL('COUNTRY'); ?>
</td>
<td>
<? MakeDropMenus('country', '0'); ?>
</td>
</tr>
<tr>
<td>
<? $lang->DoL('START_YEAR'); ?>
</td>
<td>
<input type="text" name="edit[year_start]" size="">
</td>
</tr>
<tr>
<td>
<? $lang->DoL('END_YEAR'); ?>
</td>
<td>
<input type="text" name="edit[year_end]" size="">
</td>
</tr>
<tr>
<td>
<? $lang->DoL('ADDITIONAL_INFO'); ?>
</td>
<td>
<textarea name="edit[add_info]"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: right;">
<input type="submit" name="submit" value="<? $lang->DoL('FORM_SUBMIT'); ?>">
</td>
</form>
</table>
<?
}Fatal error: Call to a member function on a non-object in /home/users/andrew/public_html/cv/edit/education_3.php on line 90