PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
if(ISSET($_REQUEST['submit'])){
// Get username and password from the form
$email = trim($_REQUEST['email']);
$password = md5(trim($_REQUEST['password']));
$author = $_REQUEST['checkbox'];
// When the user is student
if($author == null){
checkStudentAccount($email,$password);
}
// Not yet implemented
if($author == 'teacher'){
print "Teacher";
die();
}
function checkStudentAccount($email,$password){
...
}
The error that I am getting
Fatal error: Call to undefined function: checkstudentaccount()
<?php
if(isset($_REQUEST['submit'])) {
// Get username and password from the form
$email = trim($_REQUEST['email']);
$password = md5(trim($_REQUEST['password']));
$author = $_REQUEST['checkbox'];
// When the user is student
if($author == null) {
checkStudentAccount($email,$password);
}
// Not yet implemented
if($author == 'teacher') {
print "Teacher";
die();
}
} // [b]<--- THIS CLOSING BRACE WAS MISSING.[/b]
function checkStudentAccount($email,$password){
return true;
}
?>
If you had indented properly, you would have been more likely to notice that closing brace error .