unknown error

Discussion in 'PHP' started by nrodes, Nov 6, 2008.

  1. #1
    hello. I'm not very good with php and im trying to make a simple login.

    this is my code:


    Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\Abyss Web Server\htdocs\forum\login\validate.php on line 15


    and this is the error:

    <?php

    session_start();

    //get input data
    $user=$_POST["username"];
    $pass=$_POST["password"];

    //encrypt username and pass
    $cuser=md5($user);
    $cpass=md5($pass);

    //make variables
    $ip = $_SERVER['REMOTE_ADDR'];
    $userplusip = $user $ip;

    //include login file
    include($user . ".php");

    //make sure info matches and starts session
    if ($cuser==$realuser && $cpass==$realpass)
    {
    $_SESSION["auth_username"] = $user;
    $_SESSION["userplusip"] = $userplusip;
    header( 'Location: redo.htm' );
    }
    else
    {
    header ( 'location: redo.htm' );
    }

    ?>
     
    nrodes, Nov 6, 2008 IP
  2. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #2
    $userplusip = $user $ip; //problem
    PHP:
    Do this

    $userplusip = $user . $ip;
    PHP:
     
    greatlogix, Nov 6, 2008 IP