Parse error: syntax error, unexpected T_LNUMBER. Help me.

Discussion in 'PHP' started by moneymaker45, Apr 14, 2010.

  1. #1
    Hi. I have implemented the following code:

    
    
    <?php
    
    require_once 'lib/config.php';
    
    $str= $_REQUEST["id"].":".$_REQUEST["snuid"].":".$_REQUEST["currency"].":".$MYSECRETFBKEYHERE;
    
    If ($_REQUEST["verifier"]==md5($str)){
    
    if( !empty($_REQUEST['snuid']) ) { 
    
    	$res = query("UPDATE `cu_users` SET `upoints` = (`upoints`+$_REQUEST[currency]) WHERE `userid`=$_REQUEST[snuid]");
    
    	if( $res ) {
    		echo 1;
    	}
    	else {
    		echo 0;
    	}
    }
    
    
    if( !empty($_REQUEST['new']) ) { 
    
    	$res = query("UPDATE `cu_users` SET `upoints` = (`upoints`+$_REQUEST[new]) WHERE `userid`=$_REQUEST[uid]");
    
    	if( $res ) {
    		echo 1;
    	}
    	else {
    		echo 0;
    	}
    }
    
    //Rockyou implementation
    if( !empty($_REQUEST['userId']) ) { 
    
    	$res = query("UPDATE `cu_users` SET `upoints` = (`upoints`+$_REQUEST[currencyAmt]) WHERE `userid`=$_REQUEST[userId]");
    
    	if( $res ) {
    		echo 1;
    	}
    	else {
    		echo 0;
    	}
    }
    }
    //echo "test";
    //CPA integration
    $subid = $_REQUEST['subid'];
    $survey = $_REQUEST['survey'];
    $earn = $_REQUEST['earn'];
    $pdtshow = $_REQUEST['pdtshow'];
    if( !empty($_REQUEST['subid']) ) { 
    $res = query("UPDATE `cu_users` SET `upoints` = (`upoints`+".$pdtshow.") WHERE `userid`=".$subid."");
    echo "ok";
    
    	if( $res ) {
    echo "Success: ".$subid." earned ".$pdtshow." points\n"; 
    	}
    	else {
    		echo 0;
    	}
    }
    
    
    else {
    
    echo "you have attempted to steal from me";
    die;
    }
    ?>
    
    
    
    Code (markup):
    I'm obtaining this error: Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/algarzon/public_html/facebook/update.php on line 5.

    Can u help me?. I don't know what the problem is.
     
    moneymaker45, Apr 14, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Replace $MYSECRETFBKEYHERE to MYSECRETFBKEYHERE (MYSECRETFBKEYHERE without "$") and try again.
     
    s_ruben, Apr 15, 2010 IP
  3. aTo

    aTo Active Member

    Messages:
    473
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    #3
    <?php
    
    require_once 'lib/config.php';
    
    $str = $_REQUEST['id'].":".$_REQUEST['snuid'].":".$_REQUEST['currency'].":".$MYSECRETFBKEYHERE;
    
    if ($_REQUEST['verifier'] == md5($str))
    {
    	if( !empty($_REQUEST['snuid']) ) 
    	{ 
    
    		$res = mysql_query("UPDATE `cu_users` SET `upoints` = (`upoints` + ".$_REQUEST['currency'].") WHERE `userid` = ".$_REQUEST['snuid']."");
    
    	echo ($res) ? 1 : 0;
    	}
    
    
    	if( !empty($_REQUEST['new']) ) 
    	{ 
    
    		$res = mysql_query("UPDATE `cu_users` SET `upoints` = (`upoints` + ".$_REQUEST['new'].") WHERE `userid` = ".$_REQUEST['uid']."");
    
    		echo ($res) ? 1 : 0;
    	}
    
    	//Rockyou implementation
    	if( !empty($_REQUEST['userId']) ) 
    	{ 
    
    		$res = mysql_query("UPDATE `cu_users` SET `upoints` = (`upoints` + ".$_REQUEST['currencyAmt'].") WHERE `userid` = ".$_REQUEST['userId']."");
    
    		echo ($res) ? 1 : 0;
    	}
    }
    //echo "test";
    //CPA integration
    $subid = $_REQUEST['subid'];
    $survey = $_REQUEST['survey'];
    $earn = $_REQUEST['earn'];
    $pdtshow = $_REQUEST['pdtshow'];
    if( !empty($_REQUEST['subid']) ) 
    { 
    	$res = mysql_query("UPDATE `cu_users` SET `upoints` = (`upoints`+".$pdtshow.") WHERE `userid`=".$subid."");
    	echo "ok";
    
    	if( $res ) 
    		echo "Success: ".$subid." earned ".$pdtshow." points\n"; 
    	else
    		echo 0;
    }
    else
    {
    
    echo "you have attempted to steal from me";
    die;
    }
    ?>
    PHP:
    I don't know if that will help yah :)
     
    aTo, Apr 15, 2010 IP
  4. moneymaker45

    moneymaker45 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    None of the solutions worked.

    I have tried this, but then it shows me another error: Parse error: syntax error, unexpected T_DNUMBER in /home/algarzon/public_html/facebook/update.php on line 5

    Any other idea? Thanks
     
    moneymaker45, Apr 15, 2010 IP
  5. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #5
    Is variable MYSECRETFBKEYHERE constant? Check the variable exist or not by the function "defined".
     
    s_ruben, Apr 15, 2010 IP