<?php
if (isset($_POST['uname']) && isset($POST['password']))
//function validate($data)
//{
//$data = trim($data);
//$data = stripslashes($data);
//$data = htmlspecialchars($data);
//return $data;
//}
{
$uname = $_POST['uname'];
$pass = $_POST['password'];
if (empty($uname))
{
header("location: index.php?error=User Name is required");
exit();
}
else if (empty($pass))
{
header("location: index.php?error=Password is required");
exit();
}
else
{
echo "Valid input";
}
else
{
header("location: index.php");
exit();
}
}
?>
Foutmelding
Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\USB WebServer\root\Youtube3\login.php on line 30
IK zie hem niet. Wie Wel?