Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2962
PHP User Login Design Problem
Results 1 to 3 of 3

Thread: PHP User Login Design Problem

  1. #1
    Junior Member
    Join Date
    Jan 2005
    B.C. Canada

    Thumbs up

    HI, Guys!

    I have a problem of using PHP to develop a user login for the restricted webpages of my website....

    I need your help! :unsure:

    Could you tell me what's wrong with the coding?[the BOld & highlighted line below]


    <title>Jason&#39;s Photo Album</title>

    <body bgcolor="white" text="black" link="black" vlink="#666666" alink="#999999" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
    <p align="center"><font face="Arial">


    $user = "Ducky"; #This is the username you login with
    $password = "yogatogapi"; #This is the password you login with

    if($_POST["name"]==$user) {
    if($_POST["pass"]==$password) {
    ? #If username and password is correct
    ? <meta http-equiv="refresh"? content="0;URL=http://wwww.something.com/JasonsPhotoAlbum.html">
    ? #If username is correct but password isn&#39;t
    ? echo "The password you entered was invalid!";
    if($_POST["pass"]==$password) {
    ? #The username was wrong but the password wasn&#39;t
    ? echo "The username you provided was invalid!";
    ? }else{
    ? #The username and password were both wrong
    ? echo "The username and password you provided was invalid!";




    Thank you very much!

  2. #2
    Join Date
    Aug 2004
    Toronto, Canada
    header("Location: http://www.msforums.org");
    Not sure what exactly is happening, would this work?

  3. #3
    Junior Member
    Join Date
    Jan 2005
    B.C. Canada
    It returns an RUNTIME ERROR when I proceed login!

    Warning: Cannot modify header information - headers already sent by (output started at D:\--------\login.php:10) in D:\--------\login.php on line 18
    Do you have any idea why this runtime error occured?

Similar Threads

  1. 1 user can't login in LDAP
    By naerey in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 09-06-2011, 11:10 AM
  2. Wuftp-Login for System User
    By honey bee in forum Linux - General Topics
    Replies: 0
    Last Post: 09-01-2007, 05:59 AM
  3. single user login. no login at startup
    By donovan in forum Linux - General Topics
    Replies: 3
    Last Post: 01-12-2005, 08:57 AM
  4. Problem with new user login
    By geoffp in forum Announcements and Suggestions
    Replies: 3
    Last Post: 10-11-2003, 05:10 AM
  5. Changing user login to GUI
    By rolltidega in forum Redhat / Fedora
    Replies: 4
    Last Post: 10-16-2002, 08:23 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts