Search found 6 matches

by Deer
Sat Oct 15, 2011 10:18 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Re: Two parse errors and one smaller issue with user account

jacek wrote:What is the error now ?, the missing $ should not cause a parse error. IT would cause the file not to be included though.

Well now I have like 8 different errors though I'm able to get to the register and login pages. The errors messages are just displayed on the page, it's odd.
by Deer
Tue Oct 11, 2011 10:32 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Re: Two parse errors and one smaller issue with user account

$path = dirname(_FILE_); should be $path = dirname(__FILE__); btw. And header{'Location: login.php'); You have a { here where a ( should be. Hard to spot ! Hmm. I fixed both of these errors but I'm still getting the error message. All of the brackets are closed it seems, I'm stumped. <?php session_...
by Deer
Tue Oct 11, 2011 1:05 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Re: Two parse errors and one smaller issue with user account

Could you post your full code? It might be that you've forgotten a } somewhere :-) <?php session_start(); $exceptions = array('register','login'); $page = substr(end(explode('/', $_SERVER['SCRIPT_NAME'])),0, -4) ; if (in_array($page, $exceptions) === false){ if(isset($_SESSION['username']) === fals...
by Deer
Mon Oct 10, 2011 10:49 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Re: Two parse errors and one smaller issue with user account

That should be $_SESSION['username'] = htmlentities($_POST['username']); Well it seems like a new issue has appeared. Parse error: syntax error, unexpected '{' in /home/username/public_html/core/init.inc.php on line 12 The odd thing here is that there is no "{" on line 12: header('Locatio...
by Deer
Mon Oct 10, 2011 12:21 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Re: Two parse errors and one smaller issue with user account

Parse error: syntax error, unexpected '{', expecting '(' in /home/username/public_html/register.php on line 17" Here's line 17: if (empty{$_POST['password']) || empty($_POST['repeat_password'])){ You got an { where it should be (. (empty{$_POST['password']) Thanks! That fixed that and I'm gues...
by Deer
Sun Oct 09, 2011 6:35 pm
Forum: PHP
Topic: Two parse errors and one smaller issue with user accounts.
Replies: 12
Views: 1791

Two parse errors and one smaller issue with user accounts.

Hi guys. I've been following the tutorial for user accounts and I recently finished it. When I started to test it out I noticed two large errors and one smaller one. The first of which is this: "Parse error: syntax error, unexpected '{', expecting '(' in /home/username/public_html/register.php ...