Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
Parse error. Unexpected ";" is driving me mad...
Old 12-26-2009, 07:51 PM Parse error. Unexpected ";" is driving me mad...
Experienced Talker

Posts: 48
Name: Craig
Trades: 0
I can not for the life of me figure out what is causing this error. I've been staring at it for half a day now, adding parenthesis and curly brackets everywhere and just throwing stuff in. I have no idea why it is throwing the parse error. Here's the code:

PHP Code:
<?php

$username 
mysql_real_escape_string($_POST['user_name']);
$password mysql_real_escape_string($_POST['password']);

require 
'database.php';

$q "SELECT id FROM users WHERE user_name = '$username' AND password = '$password'";

$result $mysqli->query($q) or die(mysqli_error());

    if (
mysqli_num_rows($result) == 1) (
        
setcookie('authorized'10); <---- HERE IS THE ERROR
        header
("Location: index.php");
    )   else    (
        
header("Location: login.php");
    )

?>
werm82 is offline
View Public Profile
 
 
Register now for full access!
Old 12-26-2009, 08:04 PM Re: Parse error. Unexpected ";" is driving me mad...
Experienced Talker

Posts: 48
Name: Craig
Trades: 0
Wow, never mind. Changed some parenthesis to curly braces, all is well. Feel free to delete the post. Sorry!
werm82 is offline
View Public Profile
 
Closed Thread     « Reply to Parse error. Unexpected ";" is driving me mad...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10197 seconds with 12 queries