0

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

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by pritaeas
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.