mrbean Posted May 6, 2010 Share Posted May 6, 2010 if someone types the correct code it should be giving 100 credits to the user but if they type the correct code it isn't giving results to the user and my database can somebody help me why it isn't giving results here is the php code somethings are in dutch language: <?php include("_include-config.php"); if(! check_login()) { header("Location: login.php"); exit; } mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); $IP = $_SERVER['REMOTE_ADDR']; ?> <!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://grandcriminals.zymichost.com/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?test=faaxq&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 `credits`=`credits`+'100',`cash`=`cash`+'500000' WHERE `login`='".$_SESSION['login']."' LIMIT 1"); mysql_query("INSERT INTO `[logs]`(`time`,`ip`,`forwarderfor`,`login`,`person`,`code`,`area`) values('{$data['login']}','{$data['email']}',NOW(),'{$_SERVER['REMOTE_ADDR']}','100 credits')'')"); 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] (time,ip,forwarderfor,login,person,code,area) VALUES ('".$_SESSION['login']."',NOW(),'".$_SERVER['REMOTE_ADDR']."')"); } } echo '</td></tr>'; } ?> </table> </td> </td> </body> </html> Link to comment https://forums.phpfreaks.com/topic/200876-my-script-isnt-giving-results-back/ Share on other sites More sharing options...
mrbean Posted May 6, 2010 Author Share Posted May 6, 2010 here is more information about mysql database: CREATE TABLE `[users]` ( `id` int(4) not null auto_increment, `signup` datetime, `login` varchar(16), `pass` varchar(32), `level` int(3) not null default '1', `IP` varchar(32), `email` varchar(64), `type` int(1), `url` varchar(128) not null, `info` text not null, `cash` int(9) not null default '500', `bank` int(9) not null default '150000', `bankleft` int(1) not null default '20', `bankmax` int(4) not null default '500000', `clicks` int(4) not null default '40', `clickstoday` int(3) not null default '0', `attack` int(6) not null default '0', `defence` int(6) not null default '0', `attwins` int(6) not null default '0', `attlosses` int(6) not null default '0', `defwins` int(6) not null default '0', `deflosses` int(6) not null default '0', `bonus` text not null, `turns` int(3) not null default '100', `showonline` int(1) not null default '1', `online` datetime not null default '0000-00-00 00:00:00', `activated` int(1) not null default '1', `Mobieltje` int(1) not null default '1', `Helm` int(5) not null default '0', `Politie wagen` int(5) not null default '0', `IPs` text not null, `blocklist` text not null, `avaurl` varchar(255) not null default 'images/geen.jpg', `topbalk` int(5) not null default '1', `wapens` int(5) not null default '0', `ster` int(3) not null default '0', `land` int(32) not null default '1', `landkut` datetime not null default '0000-00-00 00:00:00', `landvlieg` int(5) not null default '0', `gevangenis` datetime not null default '0000-00-00 00:00:00', `gevangenistijd` int(255) not null default '0', `cellpoging` int(3) not null default '0', `busting` int(7) not null default '0', `bustprijs` bigint(255) not null default '0', `ocsdoen` int(11) not null default '2', `ocs` int(11) not null default '0', `oc_lost` int(11) not null default '0', `oc_won` int(11) not null default '0', `orgtime` varchar(255) not null, `gstart` int(11) not null default '0', `drugsmeter` int(255) not null default '50', > `credits` int(11) not null default '5', `rank` int(255) not null default '1', `rankvord` varchar(255) not null default '0.00', `eerpunten` int(5) not null default '5', `beroof` datetime not null default '0000-00-00 00:00:00', `beroof1` int(100) not null default '0', `forumban` int(1) not null default '0', `ban` int(5) not null default '0', PRIMARY KEY (`id`), UNIQUE KEY (`login`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=402; Link to comment https://forums.phpfreaks.com/topic/200876-my-script-isnt-giving-results-back/#findComment-1054020 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.