Current location: Hot Scripts Forums » Programming Languages » PHP » My Login script

My Login script

Reply
  #1 (permalink)  
Old
New Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
My Login script

It has been a while since I have coded php and I have recently decided to get back to it. This script used to work but as I said it has been a while and with all the updates in PHP it is out of date. Could someone give me some pointers on why this is no longer working.

These are the 2 bits of code involved. The first is on my homepage

<form method=post action=login.php>
<tr><td width="67" with=10>User:</td><td width="145"><input type=text name=user></td>
<td width="486" align=right with=100%>Current Game Time: <? $date = date("h:i:s A T"); print "$date"?> </td>
</tr>
<tr><td with=10>Password:</td><td><input type=password name=pass></td>

and then this is what it directs too

<?php
if (!$user || !$pass) {
include("head.php");
print "Please fill out all fields.";
include("foot.php");
exit;
}
include("head.php");
$pass = md5("$pass");
$logres = mysql_num_rows(mysql_query("select * from players where user='$user' and pass='$pass'"));
if ($logres <= 0) {
print "Login failed. If you have not already, please signup. Otherwise, check your spelling and login again.";
include("foot.php");
exit;
} else {
session_register("user");
session_register("pass");
print "&nbsp;<br>Welcome back. Please click <a href=updates.php>here</a> to continue..";
}
include("foot.php");
?>


NO matter what I do it just says please fill out al the fields. ONce again thank you in advance
Reply With Quote

Featured Marketplace Scripts (view more)

Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with auto login script homegast JavaScript 0 04-18-11 11:01 PM
Need help with Unsecure Login Script with redirect robohalo22 HTML/XHTML/XML 4 01-22-10 10:53 AM
Login script - Secure? Deansatch PHP 5 06-05-08 12:16 PM
login script works fine in firefox, nothing in IE! varial PHP 3 03-14-05 08:36 AM
Login script not working in frame... varial PHP 6 03-04-05 09:26 AM


All times are GMT -5. The time now is 12:57 AM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.