Jump to content

login help


tom232

Recommended Posts

for some reason users are not able to log in. and i get this "You could not be logged in.
You must be logged in to view this page." which is in my code. help please
[code]<?php

// include function files for this application
require_once('bookmark_fns.php');
session_start();

//create short variable names
$username = $_POST['username'];
$passwd = $_POST['passwd'];

if ($username && $passwd)
// they have just tried logging in
{
  try
  {
    login($username, $passwd);
    // if they are in the database register the user id
    $_SESSION['valid_user'] = $username;
  }
  catch(Exception $e)
  {
    // unsuccessful login
    do_html_header('Problem:');
    echo 'You could not be logged in.
          You must be logged in to view this page. ';
    do_html_url('login.php', 'Login');
    do_html_footer();
    exit;
  }     
}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/32881-login-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.