golin_knar Posted November 21, 2008 Share Posted November 21, 2008 I'm creating a log in form in a templating framework and just as I finished typing up the logic for user validation I got a: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in login.php on line 28 The section I was doing the logic in when things messed up is here: //start object buffer ob_start(); //check validation, if bad send error else redirect to index if(isset($_POST['submit'])) { if(isset($_POST['username'])) { if(isset($_POST['password'])) { $user = $_POST['username']; $passwd = sha1($_POST['password']); $result = query('select count(*),role from Users where password ="'.$passwd.'" and username="'.$user.'"'); //a function in dbconnect.php that wraps up sending a query through oracle osi functions.. it works. if($result[0] == 1) //nrows == 1 { $_SESSION['username'] = $user; //redirect to index. its in my RedirectBrowserException.php. Its working. throw new RedirectBrowserException('index.php'); } else echo "Error: Username / Password didn't match any of our records. Are you sure you're registered?\n<br/>\n"; } else echo "Error: You forgot to type in a password :-) <br/> \n"; } else echo "Error: You forgot to type in a username : - ) <br/> \n"; } $output=ob_get_clean(); My full code is attached in a regular text file. Do any of you have an idea of where the error could be coming from? [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 21, 2008 Share Posted November 21, 2008 You're missing a colon at the end of this line: $extra = new Extra($output) Quote Link to comment Share on other sites More sharing options...
golin_knar Posted November 21, 2008 Author Share Posted November 21, 2008 Wow, thanks for responding so fast! Fixed that mistake, but the error still remains.. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 21, 2008 Share Posted November 21, 2008 Look at line 23, you have a ` in the middle of no where. Quote Link to comment Share on other sites More sharing options...
golin_knar Posted November 21, 2008 Author Share Posted November 21, 2008 Thank you so much! I have no idea why I typed that character there, but I definitely wasn't going to find that one on my own. Now I know to do a search for ` every time I can't find where my errors come from. Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.