What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » what is wrong with this php code.....

what is wrong with this php code.....
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
O.P. what is wrong with this php code.....
i dont actually get any errors
it just doesnt let me login
code:
<?
session_start();
if($_POST['submit'])
{
mysql_connect("localhost","****","****");
mysql_select_db("crimpa_forum");
$user = ($_POST['username']);
$pass = md5($_POST['password']);
$query = mysql_query("SELECT * FROM users WHERE username = '$user' AND password = '$pass' ");
$rows = mysql_num_rows($query);
      if($rows == 1)
      {
      echo 'user logged in successfully';
      $_SESSION['user'] = $user;
      $_SESSION['pword'] = md5($pword);     
      }
      else { echo 'incorrect username or password'; }
}
else
{
?>
<form method="post" action="login.php">
<TABLE>
<TR>
   <TD valign="top">Username:</TD>
   <TD><INPUT NAME='username' TYPE='TEXT' VALUE='' size=30 maxlength="30"></TD>
</TR>
<TR>
   <TD valign="top">Password</TD>
   <TD><INPUT NAME='password' TYPE='password' VALUE='' size=30 maxlength="16">
</TR><br>
   <TD valign="top"></TD>
   <TD><INPUT TYPE="submit" name="submit" value="submit"></TD>
</TR>
</TABLE>
</form>
<?
}
?>
09-19-2004 03:06 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
what is wrong with this php code..... - by Eljay on 09-19-2004 at 03:06 PM
RE: what is wrong with this php code..... - by Choli on 09-19-2004 at 03:19 PM
RE: what is wrong with this php code..... - by Eljay on 09-19-2004 at 03:26 PM
RE: what is wrong with this php code..... - by Mnjul on 09-19-2004 at 03:55 PM
RE: what is wrong with this php code..... - by bach_m on 09-19-2004 at 04:19 PM
RE: what is wrong with this php code..... - by Mnjul on 09-20-2004 at 12:48 PM
RE: what is wrong with this php code..... - by Eljay on 09-20-2004 at 03:10 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On