Fatal error: Call to undefined function login() in C:\xampp\htdocs\project\checklogin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • david76
    New Member
    • May 2010
    • 4

    Fatal error: Call to undefined function login() in C:\xampp\htdocs\project\checklogin

    I am getting this error "Fatal error: Call to undefined function login() in C:\xampp\htdocs \project\checkl ogin.php on line 12"
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    We are going to need a lot more details that that. The error message is pretty clear, and there is little I can tell you beyond what the message tells you.

    I would advice you to check your includes. When PHP complains that a function is not defined it is usually either a missing include or a missing extension. The function name in that error suggests a missing include.

    If you want us to be able to tell you anything more than that, we need to see the code that is generating the error. -- Please only post the relevant parts though, and remember the [code] tags. Thanks ;)

    Comment

    • david76
      New Member
      • May 2010
      • 4

      #3
      Ok thank you, i just checked my mail. I will upload the code on my next msg. thanks very much atli.

      Comment

      • david76
        New Member
        • May 2010
        • 4

        #4
        Files are here

        Hi
        sorry for the late reply.

        i have attached you my work

        im not that advance with the software....

        i really appreciate it.


        thanks alot

        David

        <Edit: Adding the relevant parts of the code here. -- Atli>
        [code=php]<?
        session_start() ;
        header("Cache-control: private");
        ob_start();
        $timeStart=gett imeofday();
        $timeStart_uS=$ timeStart["usec"];
        $timeStart_S=$t imeStart["sec"];
        //require("config .php");
        //include("includ es/web_modules.php ");
        //include("includ es/clean_var.php") ;
        //include("includ es/login.class.php ");
        login();
        logincheck();
        check_user();
        ?>[/code]
        Attached Files
        Last edited by Atli; May 16 '10, 07:58 PM. Reason: Added the relevant part of the code.

        Comment

        • Atli
          Recognized Expert Expert
          • Nov 2006
          • 5062

          #5
          See lines 8 through 11 in the code I added to your post. Those are includes that you have commented out. I don't know why you did that, but that is likely what is causing your problem. The login() function is probably defined in one of those files, but because you comment them out -- thus telling PHP not to include them -- the function is never defined.

          The three last files you prevent from including there aren't a part of the file you posted, so I can't say for sure if the function is in one of them. However, I can say for sure that you need to find the file that defines your function and include it before you call the function. Otherwise you will get this error.

          Comment

          • david76
            New Member
            • May 2010
            • 4

            #6
            Thank you for your help. I created the work following tutorials online. At university they aspect us to know the software, didn’t get no tutorial from university. I’m just good with Dreamweaver software. I am getting the hang of php coding. I’ve been messing around with the codes, experimenting with it. Hope I fix it. how do you create a login. Thats all i am stuck at.

            Thank You for your help.

            Comment

            • Akrem tunisiano

              #7
              Hi
              i've got the same problem after uploading my files,and after getting some informations from forums talking about this issue i tried to change the include to include_once , thats it and the problem was fixed, try it...

              Comment

              Working...