Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unexpected parse error in my login form

    My login form used to work just fine, but now it gets a parse error.
    The error is: Parse error: parse error, unexpected T_VARIABLE in /homepages/0/d176381271/htdocs/kylecaleb/login.php on line 39

    Like I said, it used to work but now it doesn't.



    Thanks,
    Sirborder

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Let me think... ok wait I'm getting a visual image of your code... it's appearing in my mind...

    Oh, nope, nevermind, I can't see it. Maybe you should post your code so we can be helpful. Or maybe I can practice my E.S.P.!

  • #3
    Registered User
    Join Date
    Apr 2006
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    oops

    Sorry, I must have forgotten to post the code. Sorry.

    Here it is

    PHP Code:
    <?php include('header.php'); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>SD Computerz - Login</title>
    <style type="text/css">
    <!--
    .style1 {color: #000000}
    body,td,th {
     color: #FFFFFF;
    }
    body {
     background-color: #000000;
    }
    -->
    </style>

    </head>
    <body>
    <span class="style1"></span>
    <?php include('asdf.php'); ?>
    <center><h1>SD Computerz</h1></center><br />
    <?php include('menu.html'?>
    <hr />
    <center>
    <?php
    ob_start
    ();
    if(isset(
    $_SESSION['username']) && isset($_SESSION['password'])) { 
    header("Location: http://www.sdcomputerz.com/");
    }
    include(
    'dbconnect.php')
    $username=$_POST['username'];
    $password=$_POST['password'];
    $stay=$_POST['stay'];
    if(isset(
    $_POST['login'])) {
    if(!
    $username) die('Alert: Username field was left blank.');
    if(!
    $password) die('Alert: Password field was left blank.');
    if(!empty(
    $stay)) {
    $joined =''.$username.'[]'.md5($password).'';
    setcookie('login_cookie'$joined2147483647,'/''.www.sdcomputerz.com');
    }
    $get_usermysql_query("SELECT * FROM `members` where username = '$username' AND
    password = '$password'"
    );
    $qmysql_fetch_object($get_user);
    if(!
    $q) die('Alert: Incorrect name or password.');
    $_SESSION['logged_in'] = 1;
    $_SESSION['username'] = $username;
    $_SESSION['password'] = $password;
    session_write_close();
    header("Location: http://www.sdcomputerz.com/memberz");
    }else{
    ?>
    <table border="0">
    <form name="login" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
    <tr>
    <td>
    <p><b>Username</b></p></td>
    <td>
    <input type="text" name="username" /></td>
    </tr>
    <tr>
    <td>
    <p><b>Password</b></p></td>
    <td>
    <input type="password" name="password" /></td>
    </tr>
    <tr>
    <td>
    <p><b>Stay logged in?</b></p></td>
    <td>
    <input type="checkbox" name="stay[]" checked="checked" />
    </td>
    </tr>
    <tr>
    <td>
    </td>
    <td>
    <input type="submit" name="login" value="Login" />
    </td>
    </tr>
    </form>
    </table>
    <?php
    }
    ?>
    </center>
    </body>
    </html>

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Missing semi-colon

    PHP Code:
    include('dbconnect.php'); 

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,092
    Thanks
    2
    Thanked 322 Times in 314 Posts
    Quote Originally Posted by sirborder View Post
    Sorry, I must have forgotten to post the code. Sorry.
    Since we are attempting to help on a current thread, I reviewed this thread. Viewing your post after you make it to make sure it is what you intended is helpful. There is also a "Preview Post" button at the bottom of the edit window to do this before you submit the post.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #6
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You should read the other comments on your "other" thread with syntax errors. Stop asking this same question over and over and learn why it does this. If people hold your hand, you will never understand why this does what it does. If you don't care to learn and just want this fixed, I charge 85$/hr.

  • #7
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by iLLin
    I charge 85$/hr.
    Hopefully that is sarcasm, I do BIG projects and I scrape in just under half that per hour and I have years of experience.
    Omnis mico antequam dominus Spookster!

  • #8
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yea I do big projects too. Mainly CRM systems, and im breaking into oracle. You know an oracle dba charges $125/per half hour... That's where I want to be.
    Last edited by iLLin; 04-09-2007 at 03:40 PM.

  • #9
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    You'd have to know Oracle inside and out to get $250 per hour. I think you'd be hard pressed to find someone such as that.

    Someone might be willing to pay it, but that doesn't mean it is normal. It just means some people don't care about money


  •  

    Posting Permissions

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