View Full Version : Unexpected parse error in my login form

03-29-2007, 11:12 PM
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.


03-30-2007, 12:26 AM
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.! :D

03-30-2007, 01:12 AM
Sorry, I must have forgotten to post the code. Sorry.

Here it is

<?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">
<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;

<span class="style1"></span>
<?php include('asdf.php'); ?>
<center><h1>SD Computerz</h1></center><br />
<?php include('menu.html') ?>
<hr />
if(isset($_SESSION['username']) && isset($_SESSION['password'])) {
header("Location: http://www.sdcomputerz.com/");
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', $joined, 2147483647,'/', '.www.sdcomputerz.com');
$get_user= mysql_query("SELECT * FROM `members` where username = '$username' AND
password = '$password'");
$q= mysql_fetch_object($get_user);
if(!$q) die('Alert: Incorrect name or password.');
$_SESSION['logged_in'] = 1;
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
header("Location: http://www.sdcomputerz.com/memberz");
<table border="0">
<form name="login" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<input type="text" name="username" /></td>
<input type="password" name="password" /></td>
<p><b>Stay logged in?</b></p></td>
<input type="checkbox" name="stay[]" checked="checked" />
<input type="submit" name="login" value="Login" />

03-30-2007, 02:12 AM
Missing semi-colon


04-09-2007, 03:54 PM
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.

04-09-2007, 04:00 PM
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.

04-09-2007, 04:20 PM
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.

04-09-2007, 04:36 PM
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.

04-09-2007, 05:18 PM
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 ;)