1
kaotik
$xoopsUser define global
  • 2004/9/22 15:28

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I am tring to setup a php form and I want the username on it. Only logged in users can see the form.

I have this on the form:
LINE 31 global $xoopsUser, $xoopsDB;
LINE 32 $len11 = $xoopsUser->getVar('uname');

I get this error
Fatal error: Call to a member function on a non-object in /formmail.php on line 32

What am I doing wrong?

2
kaotik
Re: $xoopsUser define global
  • 2004/9/22 15:40

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I figured it out, I didn't include mainfile.

include("../mainfile.php");

Once I placed this, it fixed the problem

3
kaotik
Re: $xoopsUser define global
  • 2004/9/22 15:42

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


The Wiki should probably have a reference to this. I was using it as a guide and it doesn't say anything about mainfile:

http://wiki.xoops.org/wakka.php?wakka=XoopsGlobalVariables

4
Mithrandir
Re: $xoopsUser define global

For development, you can also check the Dev Wiki on dev.xoops.org

Login

Who's Online

155 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits