...

View Full Version : Unexpected parse error in my login form



sirborder
03-29-2007, 10: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.



Thanks,
Sirborder

Fumigator
03-29-2007, 11:26 PM
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

sirborder
03-30-2007, 12: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">
<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', $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;
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>

Nightfire
03-30-2007, 01:12 AM
Missing semi-colon



include('dbconnect.php');

CFMaBiSmAd
04-09-2007, 02: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.

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

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

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

aedrin
04-09-2007, 04: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 ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum