Jump to content

[SOLVED] Undefined Function - But It Is


mike177

Recommended Posts

Hi, I have written my own login script. It's 90% complete and I'm currently installing the edit account feature. I have 4 files which operate the system. Core.php, Process.php, Functions.php and Error_Handling.php. Error_Handling.php just handles the output of input errors ect, Core is the hart of the system and contains the main functions. Functions.php contains the functions the need to be preformed on a database ect and Process.php is where a form for example is sent the routed off the selected files and redirects the user to the correct page.

 

The system works fine excluding the account edit feature. The page is able to load but when the code is executed I get a fatal error explaining that I am calling to a function in process.php on line 86 which is not defined.

 

Now here’s where I get in deep water. I use the same methods on different functions and its works fine. But when I use it on the editAccount() function is error that it’s undefined as I mentioned.

 

I have attached the complete source code so you can have a good look for your self. I am running the latest version of php.

 

Thanks in advance for any help.

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

You're missing a closing right curly brace (}) just before/above where editAccount() function/method is defined in process.php. That closing curly brace is needed to finish off register() function/method first.

 

Currently, the editAccount() function/method is enclosed within register() and that's why it can't be found (it's defined or known about until register() is called first).

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.