ok i got a assignment to do for college, i gotta create a form, a simple form with just 2 textboxes for input of title & password, this is simple & i know how to do this, the next part of my assignment is to create a page with the following requirements:
-create a php function named loginDetails() which contain the following details, the parameters $m and $n to accept the title & password from the form, a variable $title receiving the value in textbox named title from the form & a variable $pass receiving the value in the password textbox from the form.

then i have to create the following arrays within the loginDetails() function
-array named $title with the follwing values (student, lecturer, admin)
-array named $passwd with the following values (abcd, efgh, ijkl)

then use for loop within the loginDetails function to check the entered details if they are correct.

i have done forms before with post & get methods but im completely lost here now & i cant seem to find exactly what i need for this here anywhre on the net, can anyone please help me me with this?

You are expected to show some effort when asking for schoolwork help. Post what code you have started or perhaps pseudocode fragments. Ask specific questions about what you are having trouble with.

the only code i have so far is my form & just the basic post method in the login script,


<body bgcolor="#FFFFCC" >
<form action="login.php" method="post">
<h2>Title :</h2> <input type="text" name="title" /><br />
<h2>Password :</h2> <input type="text" name="pass" /><p />
<input type="submit" value="Login" />


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<?php echo $_POST["title"] ; ?><br />
<?php echo $_POST["pass"] ; ?>

this is all i know how to do so far , i dont really get what to do with the function loginDetails() part with the $m & $n & the variable $title & $pass, the arrays & for loop i can figure out , its just this part here thats got me lost n buggered up