Hello,
I wondered if anyone could advise? I am trying to write a basic
script, which allows user's to enter there username, password in text
fields. Then we take these values and pass them to the method
login_user($use rid, $password);
I was unsure how to take the text fields values, and store them in
variables, when the submit button is clicked? And report when the user
could not be logged , or the textfields contain no values?
Thank you
<?php
function login_form(){
global $PHP_SELF, $userid, $password;
?>
<html>
<head>
<title></title>
</head>
<body>
<div align="center">
<form method="post" enctype="multip art/form-data" action="<?php
echo $PHP_SELF ?>">
<table border="1">
<tr>
<th align="right">E-mail</th>
<td nowrap>
<input name="userid" size="25">
</td>
</tr>
<tr>
<th align="right">P assword</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($use rid, $password);
?>
I wondered if anyone could advise? I am trying to write a basic
script, which allows user's to enter there username, password in text
fields. Then we take these values and pass them to the method
login_user($use rid, $password);
I was unsure how to take the text fields values, and store them in
variables, when the submit button is clicked? And report when the user
could not be logged , or the textfields contain no values?
Thank you
<?php
function login_form(){
global $PHP_SELF, $userid, $password;
?>
<html>
<head>
<title></title>
</head>
<body>
<div align="center">
<form method="post" enctype="multip art/form-data" action="<?php
echo $PHP_SELF ?>">
<table border="1">
<tr>
<th align="right">E-mail</th>
<td nowrap>
<input name="userid" size="25">
</td>
</tr>
<tr>
<th align="right">P assword</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($use rid, $password);
?>