Using variables in login script:

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


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($userid, $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


function login_form(){
   global $PHP_SELF, $userid, $password;


   <div align="center">
   <form method="post" enctype="multipart/form-data" action="<?php
echo $PHP_SELF ?>">
      <table border="1">
            <th align="right">E-mail</th>
            <td nowrap>
               <input name="userid" size="25">
            <th align="right">Password</th>
            <td nowrap>
               <input name="password" size="25">
            <td align="center">
               <input type="submit" name="submit" value="Login">

$user_info = login_user($userid, $password);


Site Timeline