Forum Moderators: coopster

Message Too Old, No Replies

unexpected T IF error message

unexpected T_IF error message on a page that worked before

         

hamburglar

5:49 pm on Dec 18, 2007 (gmt 0)

10+ Year Member



Hello WebmasterWorld.com,
I can't seem to figure why I suddenly started getting the following error message on a page that has worked before.

Parse error: parse error, unexpected T_IF in /home/content/c/a/r///html/card/card.php on line 3.

Here's the <code> from my page:
<?php
session_start();
if (($_SESSION["token"]==$_GET["key"] && if ($_SESSION["usertoken"]/411==$_GET["uid"])) {
$key=$_GET["key"];
?>
<html>
<head>
<rest of web page></code>

Please help! Will donate!

Habtom

5:56 pm on Dec 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if (($_SESSION["token"]==$_GET["key"] && if ($_SESSION["usertoken"]/411==$_GET["uid"])) {

You seem to have one more opening bracket and one more 'if':

if (($_SESSION["token"]==$_GET["key"]) && ($_SESSION["usertoken"]/411==$_GET["uid"])) {

Will donate!

:) Welcome to WebmasterWorld.

hamburglar

7:42 pm on Dec 18, 2007 (gmt 0)

10+ Year Member



oops... looks like didn't put the parenthesis in the right spots :(

if ($_SESSION["token"] == $_GET["key"] && ($_SESSION["usertoken"] / 411) == $_GET["uid"]) {

hamburglar

7:44 pm on Dec 18, 2007 (gmt 0)

10+ Year Member



ty, other ham :)

hamburglar

7:45 pm on Dec 18, 2007 (gmt 0)

10+ Year Member



in my haste and dyslexia, i thought i read that your name is hambton.... oops again... i think i'll stick to poker rather that programming :)