Current location: Hot Scripts Forums » Programming Languages » PHP » Login problem


Login problem

Reply
  #1 (permalink)  
Old 09-12-04, 04:40 AM
gop373 gop373 is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Login problem

This is login.php
<?php ob_start();
session_start();
//login.php
include("connect.php");
$sql="select * from login where username='$username'and password='$password'";
$result=mysql_query($sql);
$totalrow=mysql_num_rows($result);
if($totalrow>=1){
$row=mysql_fetch_array($result);
$id=$row[0]; //$row[0] is $row["id"]
session_register("id");
header("Location:hellomember.php");
?><br> <?}
else
{echo "Sorry";}
mysql_close($connect);
ob_end_flush();
?>

In MySQL is
id INT
username Varchar
password varchar

When I run login page I got message "Sorry" (I use correct username and password)
Reply With Quote
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
phpbb login integration SR_Ben PHP 4 08-10-06 05:04 AM
Count problem kasic ASP.NET 1 10-20-04 12:23 AM
login problem, AGAIN NeverMind Hot Scripts Forum Questions, Suggestions and Feedback 3 09-04-04 11:26 PM
login problem NeverMind Hot Scripts Forum Questions, Suggestions and Feedback 8 07-19-04 07:05 PM
HELP! Php to login to HTACCESS? godfather PHP 4 03-06-04 12:03 AM


All times are GMT -5. The time now is 04:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.