Hello
I wondered if this script seemed correct? The user should enter a
userid and password in two text fields, and then pass these values to
the method login_user.
Could I ask, is there any approach to, once the user clicks the submit
button to test the userid and password has been entered, and the text
fields are not empty.
Thank you
<?php
function login_form(){
?>
<html>
<head>
<title></title>
</head>
<body>
<div align="center">
<form method="post">
<table border="1">
<tr>
<th align="right">E-mail</th>
<td nowrap>
<input name="userid" size="25">
</td>
</tr>
<tr>
<th align="right">Password</th>
<td nowrap>
<input name="password" size="25">
</td>
</tr>
<tr>
<td align="center">
<input type="submit" name="submit" value="Login">
</td>
</tr>
</table>
</form>
<div>
</body>
</html>
<?php
}
login_form();
$user_info = login_user($_POST['userid'], $_POST['password'];
?>