Dre wrote:
<snip>
  if((empty($_POST['user_name'])) || (empty($_POST['password'])))
  {
  header('Location: index.php');
   include("login_form");
   exit();
  }

That include is useless, as you're forwarding to another document right before it.


  else{
   include("db.php");
   $sql = "SELECT * FROM  members_webdata WHERE user_name='".$username."'
AND password='".$pass."'";
   $result = mysql_query($sql);
   $num_return = mysql_num_rows($result);

   if($num_return ==1)
   {
    $row = mysql_fetch_array($result);
 $_SESSION['uname'] = $row['user_name'];

Are you sure $row['user_name'] has value?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to