Ok this is frustrating, I am still learining how to scritp in php, and so far i have not done too bad... however i cant figure this out, i think if i got a few fresh eyes on this, you might see what i am not -

the idea is to create a cookie based login and get it to validate and it is saying that it cant call my function.

<html>
<head>
<title>Login</title>
</head>

<?php
call_user_func(pc_validate());
$secret_word = 'thecommingdawnwillbetheglory';
if (pc_validate($_POST['username'],$_POST['password'])) {
  setcookie('login',
		  $_POST['usermname'].','.md5($_POST['username'].$secretword));
}
?>

<body>
You are our test login site - you will need to wait as this is a non functional site.
<form method="POST" action="login.php">
Username: <input type="text" name="username"> </br>
Password: <input type="password" mname="password"> </br>
<input type="submit" value="Log In">
</form>
</body>
</html>

and the error i get is :
"Fatal error: Call to undefined function pc_validate() in /srv/www/htdocs/login.php on line 8" on the line for the 'call_user_func()'

thanks-
Jesse Fender

First: You don't need to use call_user_func() to call pc_validate().
Second: There is no pc_validate() function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.