Code:
<?php
include ('function.login.php');
if ( $_SESSION['loggedin'] == true ) {
function loginForm ();
} else {
echo "testing";
}
?>
Don't forget the semi colons after each statement.
Inside of your if/else statement, do you wish to define the function loginForm or execute it. Normally, all of your function definitions are written prior to executing a script. I can't think of anytime you would define a function inside of an if/else statement.
So it would make more sense to have something like this:
Code:
<?php
// define the function loginForm
function loginForm () {
function code here...
}
include ('function.login.php');
if ( $_SESSION['loggedin'] == true ) {
// execute the function loginForm
loginForm ();
} else {
echo "testing";
}
?>
I hope this helps. If not, try explaining exactly what the goal of your script is.
Good luck!
Jason
Bookmarks