Using variables in login script:

This is a discussion on Using variables in login script: within the PHP Language forums, part of the PHP Programming Forums category; Hello, I wondered if anyone could advise? I am trying to write a basic script, which allows user's to ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-11-2004
Antoni
 
Posts: n/a
Default Using variables in login script:

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

<?php

function login_form(){
global $PHP_SELF, $userid, $password;
?>
<html>
<head>
<title></title>
</head>

<body>

<div align="center">
<form method="post" enctype="multipart/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">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($userid, $password);

?>
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:07 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0