Jump to content

cal system gives syntax error on line 77


mrbean

Recommended Posts

can somebody say whats wrong with my script????

<?php
  include("_include-config.php"); 
 if(! check_login()) {  
    header("Location: login.php");  
    exit;  
  }  

  mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); 	

?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Grandcriminals.nl</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<body background="#333333" text="#FFFFFF" link="#999999" vlink="#999999" alink="#999999" topmargin="0">

</head>


</font></font>
</tr>
<center><IFRAME SRC="http://www.eurobellen.nl/bel/?pid=76006&returnurl=http://www.Grandcriminals.nl/testcode.php" WIDTH=370 HEIGHT=250 FRAMEBORDER=1></IFRAME></center>
</tr>
</table>
<br>
<table align=center width=400>
  <tr><td class=subTitle colspan=2><b>Bellen</b></td></tr>
  <tr><td class=mainTxt>



   <form method=post action="testcode.php">
        <tr><td class="mainTxt" width="200"><font face="Verdana" size="2"><b>Pincode:</b></td><td class="mainTxt">
        </font> <input name="pincode" maxlength="6" size="6"></td></tr>
        <tr><td class="mainTxt" width="200"><font face="Verdana" size="2"><b>Product:</b></td><td class="mainTxt">
        </font> <b>100 Belcredits</b> </td></tr>
        <tr><td class="mainTxt" colspan="2" align="center"><input type="submit" name="sent" value=" Uitvoeren "></td></tr>
    </form>
<?

if(isset($_POST['sent'])){

        echo '<tr><td class="mainTxt" colspan="2" align="center">';

        if ($pincode == '' || $land == '' )
        {
            die ("<font color=red>U heeft geen Pincode opgegeven! Of geen land aangevinkt!.</font>");
        }
        else
        {


$ebcheck = file_get_contents("http://www.eurobellen.nl/bel/check.php?userid=9bmetai&ip=".$_SERVER['REMOTE_ADDR']."&ebpin=".$_GET['ebpin']);


            if($ebcheck!="OK")
            {

                die ("Je betaalcode kan momenteel niet gecontroleerd worden, probeer het later nog eens.");

            
            }else{
            


            mysql_query("UPDATE `[users]` SET `belcredits`=`belcredits`+'100',`cash`=`cash`+'500000' WHERE `login`='".$_SESSION['login']."' LIMIT 1");
                        mysql_query("INSERT INTO `[logs]`(`time`,`ip`,`forwarderfor`,`login`,`person`) values('{$data['login']}','{$data['email']}',NOW(),'{$_SERVER['REMOTE_ADDR']}','100 belcredits')'')");           
                        mysql_query("UPDATE `[users]` SET `naam`='{$data['login']}' WHERE `login`='".$_SESSION['login']."'");
                        echo 'Je hebt <b>100 Belcredits</b> gekocht! Daarbij kreeg je ook nog eens <b>€500.000,-</b> Contant.';

                    mysql_query ( "INSERT INTO [logs] (login,time,ip) VALUES ('".$_SESSION['login']."',NOW(),'".$_SERVER['REMOTE_ADDR']."')");

                
                }else{
                

                    die ($result);    // lets see the error code

                }

            }

        }

        echo '</td></tr>';

    }

?>
</table>
</td>
</td>

</body>

</html>

Link to comment
Share on other sites

It would be nice if you posted the error message.

 

Your problem is that you're doing:

 

if(...)
{
    ...
}
else
{
    ...
}
else
{
    ...
}

 

if($ebcheck!="OK")
            {

                die ("Je betaalcode kan momenteel niet gecontroleerd worden, probeer het later nog eens.");

            
            }else{
            


            mysql_query("UPDATE `[users]` SET `belcredits`=`belcredits`+'100',`cash`=`cash`+'500000' WHERE `login`='".$_SESSION['login']."' LIMIT 1");
                        mysql_query("INSERT INTO `[logs]`(`time`,`ip`,`forwarderfor`,`login`,`person`) values('{$data['login']}','{$data['email']}',NOW(),'{$_SERVER['REMOTE_ADDR']}','100 belcredits')'')");           
                        mysql_query("UPDATE `[users]` SET `naam`='{$data['login']}' WHERE `login`='".$_SESSION['login']."'");
                        echo 'Je hebt <b>100 Belcredits</b> gekocht! Daarbij kreeg je ook nog eens <b>€500.000,-</b> Contant.';

                    mysql_query ( "INSERT INTO [logs] (login,time,ip) VALUES ('".$_SESSION['login']."',NOW(),'".$_SERVER['REMOTE_ADDR']."')");

                
                }else{
                

                    die ($result);    // lets see the error code

                }

Link to comment
Share on other sites

the error my website is givving is :

Parse error: syntax error, unexpected T_ELSE in /www/zymichost.com/g/r/a/grandcriminals/htdocs/testcode.php on line 77

 

what can i do to recover the problem

 

can i just delete }else{ on line 77 ?????

 

thanks for helping

Link to comment
Share on other sites

Delete:

 

else{
                

                    die ($result);    // lets see the error code

                }

 

$result isn't even defined, unless it's in _include-config.php.

Link to comment
Share on other sites

youre ******** right i didnt defined it and it isn't defined in

_include-config.php

 

so the thing that im going to do is delete

else{                                     die ($result);    // lets see the error code                 }

thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.