Jump to content

Custom page


bin_asc

Recommended Posts

I`m trying to build a custom page using the template that I WHMCS has been kind to offer, but when I load the php file, even though I assigned the template file corectly, and also created the php file ok, I get a :

 

Fatal error: Call to a member function assign() on a non-object in /home/xxxx/public_html/xxxxxx.php on line 33

 

at that line I have

 

$smart->assign('email',$email);
$smart->assign('title',$title);   

 

and the email is snatched with a mysql query.

I did a var_dump just to be sure the variable does have contents, it shows works just fine.

 

Also using this template for now, to show details :

 

 

<div class="contentbox"><strong>{$LANG.clientareanavdetails}</strong> | <a href="{$smarty.server.PHP_SELF}?action=contacts">{$LANG.clientareanavcontacts}</a> | <a href="{$smarty.server.PHP_SELF}?action=addcontact">{$LANG.clientareanavaddcontact}</a>{if $ccenabled} | <a href="{$smarty.server.PHP_SELF}?action=creditcard">{$LANG.clientareanavchangecc}</a>{/if} | <a href="{$smarty.server.PHP_SELF}?action=changepw">{$LANG.clientareanavchangepw}</a></div>

<p><strong> »  {$title}</strong></p>

{if $errormessage}<div class="errorbox">{$errormessage|replace:'<li>':'  #  '}  #  </div><br />{/if}


<form method="post" action="{$smarty.server.PHP_SELF}?action=save">
<input type="hidden" name="save" value="true" />
<table cellspacing="1" cellpadding="0" class="frame">
<tr><td>
<table width="100%" cellpadding="2">
<tr><td width="150" class="fieldarea">User Email</td><td><input type="text" name="email" value="{$email}" size="25" /></td></tr>
</table>
</td></tr></table>
<br />

<p align="center">
<input type="submit" value="{$LANG.clientareasavechanges}" class="button" /> 
<input type="reset" value="{$LANG.clientareacancel}" class="button" /></p>

</form>

Am I missing something ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated