I am getting this error "Fatal error: Call to undefined function login() in C:\xampp\htdocs \project\checkl ogin.php on line 12"
Fatal error: Call to undefined function login() in C:\xampp\htdocs\project\checklogin
Collapse
X
-
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 ;) -
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 FilesComment
-
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
-
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
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
Comment