• Login
  • Register
  • Zoek
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Filebase Entry
  • More Options

ICTscripters

Dé plek voor IT

Dé plek voor IT

Login

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. Overige
  5. Archief
  6. Request

Forum

  • Het Grote Vibe Code Topic

    Jeroen.G 11 mei 2026 om 09:28
  • Ictscripters Chat

    AarClay 21 april 2026 om 11:34
  • PWYL source gezocht

    Syntax 25 maart 2026 om 11:44
  • Help testers nodig voor android app Urgent

    Servertjee 20 februari 2026 om 12:07
  • Partner Gezocht om meerdere NFT Collecties op Open Sea te Plaatsen

    Servertjee 20 februari 2026 om 12:06
  • Afspraken systeem met planbeperking

    Jeffrey.Hoekman 20 februari 2026 om 11:52
  • Developer Gezocht

    Servertjee 19 februari 2026 om 17:31
  • Na 15 jaar terug van weggeweest: iCriminals.nl is terug (BETA)!

    Servertjee 18 februari 2026 om 16:57

Marktplaats

  • 370 Nieuwe Domeinnamen April 2026

    shiga 1 mei 2026 om 12:06
  • Snel een website nodig?

    Syntax 10 april 2026 om 12:55
  • Sicarras.com - Moderne Mafia Text-Based RPG

    Syntax 5 april 2026 om 16:22

Database gegevens niet geladen

  • gamecontrol
  • 1 juni 2010 om 09:11
  • gamecontrol
    Professional
    Berichten
    699
    • 1 juni 2010 om 09:11
    • #1

    Als ik het onderstaande script in mijn source zet dan wordt opeens het rechter menu met de databasegegevens (zoals health, geld, naam, etc.) niet meer geladen (niet getoond), ga ik naar een ander script dan is alles opeens weer terug.

    Weet iemand wellicht wat er in dit script voor zorgt dat dit gebeurt want ik zie niet echt iets vreemds (op de onduidelijke opbouw na dan ;)

    PHP
    <?
    
    
     $sql  = mysql_query("SELECT * FROM `users` where `login`='$data->login'");
    $data = mysql_fetch_assoc($sql);
    
    
    	?>
    <div id="contentbar_main">
    <div id="notice_container"></div>
    
    
    <div id="cbs"><div class="cb">
    
    
    <h1>Detective</h1><p></p>
    
    
    <table width='90%' cellpadding='0' cellspacing='0'>
    <td width=40% valign=top>
    <table width='90%' cellpadding='2' cellspacing='1'>
      <?php
    
    
    
    
    
    
    print <<<ENDHTML
    
    
      <?php
    $dbres       = mysql_query("SELECT *,UNIX_TIMESTAMP(`tijd`) AS `tijd`,0 FROM `detective`");
    while($delete = mysql_fetch_assoc($dbres)){
    $tijd             = $delete[tijd]+$delete[uren]*60*60-time();
    }
    
    
    print <<<ENDHTML
    <form method="POST">
    
    
    <table width=80%>
      <tr><td class="subTitle"><b>Informatie</b></td></tr>
      <tr><td class="mainTxt">Voordat je een poging kunt doen om iemand te vermoorden moet
    		je hem/haar eerst laten opsporen door een detective. Nadat
    		de detective hem/haar heeft gevonden, kun je naar hetzelfde
    		land reizen om hem/haar te vermoorden.<br />
    		1 uur zoeken kost je $<table width='90%' cellpadding='0' cellspacing='0'>
     kost het je $80.000
    		</td>
    
    
      </td></tr>
    </table>
    
    
     <tr><td class="subTitle" colspan=2><b>Vermoorden</b></td></tr>
      <tr><td class="mainTxt" colspan=2><table colspan=2>
    <form method="POST">
    		<td align="left">Persoon:</td>
    		<td><input class="mod_submit"type="text" name="naamd" /></td>
    	</tr>
    	<tr class="inhoud">
    		<td align="left">Aantal uren:</td>
    		<td><select size="1" name="uren">
    	<option selected value="1">1 uur</option>
    	<option value="2">2 uren</option>
    	<option value="3">3 uren</option>
    	<option value="4">4 uren</option>
    	<option value="5">5 uren</option></td>
    			</td>
    	</tr>
    	<tr class="inhoud">
    		<td align="left" valign="top">Landen:</td>
    		<td>
    		<table align="left">
    			<tr>
    							<td><input class="mod_submit"type="checkbox" name="zProvincie1" /> NederLand</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie2" /> Frankrijk</td>
    							</tr>
    			<tr>
    									<td><input class="mod_submit"type="checkbox" name="zProvincie3" /> Cuba</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie4" /> Rusland</td>
    							</tr>
    			<tr>
    									<td><input class="mod_submit"type="checkbox" name="zProvincie5" /> Australie</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie6" /> VS</td>
    							</tr>
    			<tr>
    										<td><input class="mod_submit"type="checkbox" name="zProvincie8" /> Alle landen</td>
    							</tr>
    			<tr>
    								</tr>
    <td class=sub align=left><input class="mod_submit"type="submit" value="Zoek persoon" name="submitt"></td></tr>
    </td></tr></table>
    </form>
    </td></tr>
    
    
    		</td>
    	</tr>
    
    
    </form>
    </form>
    
    
    ENDHTML;
    
    
    
    
    
    
    if(isset($_POST['submitt'])) {
    $naam          = $_POST['naamd'];
    $naam1         = mysql_query("SELECT * FROM `users` WHERE `login`='$naam'");
    $naam1         = mysql_num_rows($naam1);
    $uren = $_POST['uren'];
    
    
    if ($uren < 1 )
    {
    echo "Cheaten is niet toegestaan!";
    mysql_query("INSERT INTO `logs`(`time`,`IP`,`forwardedFor`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SESSION['login']}','{$_SESSION['login']}','0','cheaten met detective')") or die(mysql_error());
    exit;
    }
    if($_POST['naamd'] ==""){
    print "<table width=100%><tr><td class=maintxt>Je moet wel een naam invullen.</tr></td>";
    }
    elseif($naam1 ==0){
    print "<table width=100%><tr><td class=maintxt>De naam die je hebt ingevoerd bestaat niet.</tr></td>";
    }
    elseif($uren*20000 > $data[contant]){
    print "<table width=100%><tr><td class=maintxt>Zoveel geld heb je niet op zak.</tr></td>";
    }
    else{
    $geld        = $uren*20000;
    $vind1       = 5/$uren;
    $vind1       = round($vind1);
    $vind1       = rand(0,$vind1);
    $vind        = rand(900,$uren*60*60);
    
    
    mysql_query("INSERT INTO `detective` (`tijd`,`uren`,`zoeker`,`naam`,`status`,`vind`,`land`) values(NOW(),'$uren','$data[login]','$naam','0','$vind','0')");
    mysql_query("UPDATE `users` SET `contant`=`contant`-'$geld' WHERE `login`='$data[login]'");
    print "<table width=100%><tr><td class=maintxt>De detective is bezig met zoeken.</tr></td>";
    }
    }
    print "</td>
    ";
    
    
    if(isset($_POST['wis'])) {
    $id               = $_POST['id'];
    mysql_query("DELETE FROM `detective` WHERE `id`='$id'");
    print "<table width=100%><tr><td class=maintxt>Je hebt de detective ontslagen.</tr></td>";
    }
    if( $_POST['wissen'] ){
    mysql_query("DELETE FROM `detective` WHERE `zoeker`='$data[login]'");}
    
    
    		print "	<form method=post>";
    	print "
    	
    	
    	<table width='80%' cellpadding='2' cellspacing='1'>
    	<tr><td class=subtitle colspan=4>huidige zoekacties</td></tr>
    	<tr><td class=maintxt><b>Naam:</b></td><td class=maintxt><b>Tijd bezig:</b></td><td class=maintxt><b>Land:</b></td><td class=maintxt width=50><b>annuleren:</b></td></tr>";
    
    
    
    
    $detectives2        = mysql_query("SELECT *,UNIX_TIMESTAMP(`tijd`) AS `tijd`,0 FROM `detective` WHERE `zoeker`='$data[login]'");
    
    
    while($detectives = mysql_fetch_assoc($detectives2)) {
    $tijd             = $detectives[tijd]+$detectives[uren]*60*60-time();
    $tijd2            = $tijd-3600;
    $tijd1            = date("H:i:s", "$tijd2");
    $zoeker           = mysql_query("SELECT * FROM `users` WHERE `login`='$detectives[naam]'");
    $zoeker           = mysql_fetch_assoc($zoeker);
    $land1         = array("Bezig","$city_1","$city_2","$city_3","$city_4","$city_5","$city_6");
    $land          = $land1[$detectives[land]];
    
    
    
    
    
    
    if($detectives[tijd] + $detectives[vind] < time() && $detectives[vind] !=0){
    mysql_query("UPDATE `detective` SET `land`='$zoeker[land]', `status`='1' WHERE `id`='$detectives[id]'");
    }
    
    
    if($tijd <1){
    $tijd1 = "Gefaald";
    }
    
    
    if($detectives[status] ==1){
    $tijd1          = "Gevonden";
    }
    
    
    	print " <tr><td class=maintxt>{$detectives[naam]}</td>  <td class=maintxt><b>{$tijd1}</b></td>  <td class=maintxt>{$land}</td><td class=maintxt><input class=\"mod_submit\"type=radio name=id value={$detectives[id]}></td></tr>";
    	}
    
    
    print " <tr><td class=\"maintxt\" colspan=4><input class=\"mod_submit\" type=\"submit\" value=\"Ontslaan!\" name=\"wis\"></td></tr>";
    
    
    ?>
    </div></div></div>
    </table>
    </table></table></table>
    Toon Meer

    Promoot je site gratis op http://www.gamevote.nl

  • Axl_H
    WAN\'T TO LEARN SOMETHING
    Berichten
    1.465
    • 1 juni 2010 om 09:17
    • #2

    Misschien kan je die onduidelijke opbouw omgooien tot een duidelijke opbouw, dan zal je het vanzelf zien.

  • Patrick
    Back in the game
    Ontvangen Reacties
    52
    Berichten
    1.417
    • 1 juni 2010 om 09:21
    • #3

    Kijk naar regel 17 + 23, je opent 2x php ;)

  • gamecontrol
    Professional
    Berichten
    699
    • 1 juni 2010 om 09:25
    • #4

    Thx.

    @Axl; ik wilde eerst kijken of het script wel goed zou werken voordat ik het helemaal overhoop ging gooien. Maar toch bedankt ;)

    EDIT: te enthousiast geweest. Probleem blijft hetzelfde...

    PHP
    <?
    
    
     $sql  = mysql_query("SELECT * FROM `users` where `login`='$data->login'");
    $data = mysql_fetch_assoc($sql);
    
    
    	?>
    <div id="contentbar_main">
    <div id="notice_container"></div>
    
    
    <div id="cbs"><div class="cb">
    
    
    <h1>Detective</h1><p></p>
    
    
    <table width='90%' cellpadding='0' cellspacing='0'>
    <td width=40% valign=top>
    <table width='90%' cellpadding='2' cellspacing='1'>
      <?php
    
    
    
    
    
    
    
    
    $dbres       = mysql_query("SELECT *,UNIX_TIMESTAMP(`tijd`) AS `tijd`,0 FROM `detective`");
    while($delete = mysql_fetch_assoc($dbres)){
    $tijd             = $delete[tijd]+$delete[uren]*60*60-time();
    }
    ?>
    
    
    <form method="POST">
    
    
    <table width=80%>
      <tr><td class="subTitle"><b>Informatie</b></td></tr>
      <tr><td class="mainTxt">Voordat je een poging kunt doen om iemand te vermoorden moet
    		je hem/haar eerst laten opsporen door een detective. Nadat
    		de detective hem/haar heeft gevonden, kun je naar hetzelfde
    		land reizen om hem/haar te vermoorden.<br />
    		1 uur zoeken kost je <table width='90%' cellpadding='0' cellspacing='0'>
     kost het je 80.000
    		</td>
    
    
      </td></tr>
    </table>
    
    
     <tr><td class="subTitle" colspan=2><b>Vermoorden</b></td></tr>
      <tr><td class="mainTxt" colspan=2><table colspan=2>
    <form method="POST">
    		<td align="left">Persoon:</td>
    		<td><input class="mod_submit"type="text" name="naamd" /></td>
    	</tr>
    	<tr class="inhoud">
    		<td align="left">Aantal uren:</td>
    		<td><select size="1" name="uren">
    	<option selected value="1">1 uur</option>
    	<option value="2">2 uren</option>
    	<option value="3">3 uren</option>
    	<option value="4">4 uren</option>
    	<option value="5">5 uren</option></td>
    			</td>
    	</tr>
    	<tr class="inhoud">
    		<td align="left" valign="top">Landen:</td>
    		<td>
    		<table align="left">
    			<tr>
    							<td><input class="mod_submit"type="checkbox" name="zProvincie1" /> NederLand</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie2" /> Frankrijk</td>
    							</tr>
    			<tr>
    									<td><input class="mod_submit"type="checkbox" name="zProvincie3" /> Cuba</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie4" /> Rusland</td>
    							</tr>
    			<tr>
    									<td><input class="mod_submit"type="checkbox" name="zProvincie5" /> Australie</td>
    								<td><input class="mod_submit"type="checkbox" name="zProvincie6" /> VS</td>
    							</tr>
    			<tr>
    										<td><input class="mod_submit"type="checkbox" name="zProvincie8" /> Alle landen</td>
    							</tr>
    			<tr>
    								</tr>
    <td class=sub align=left><input class="mod_submit"type="submit" value="Zoek persoon" name="submitt"></td></tr>
    </td></tr></table>
    </form>
    </td></tr>
    
    
    		</td>
    	</tr>
    
    
    </form>
    </form>
    <?php 
    
    
    
    
    
    
    
    
    if(isset($_POST['submitt'])) {
    $naam          = $_POST['naamd'];
    $naam1         = mysql_query("SELECT * FROM `users` WHERE `login`='$naam'");
    $naam1         = mysql_num_rows($naam1);
    $uren = $_POST['uren'];
    
    
    if ($uren < 1 )
    {
    echo "Cheaten is niet toegestaan!";
    mysql_query("INSERT INTO `logs`(`time`,`IP`,`forwardedFor`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SESSION['login']}','{$_SESSION['login']}','0','cheaten met detective')") or die(mysql_error());
    exit;
    }
    if($_POST['naamd'] ==""){
    print "<table width=100%><tr><td class=maintxt>Je moet wel een naam invullen.</tr></td>";
    }
    elseif($naam1 ==0){
    print "<table width=100%><tr><td class=maintxt>De naam die je hebt ingevoerd bestaat niet.</tr></td>";
    }
    elseif($uren*20000 > $data[contant]){
    print "<table width=100%><tr><td class=maintxt>Zoveel geld heb je niet op zak.</tr></td>";
    }
    else{
    $geld        = $uren*20000;
    $vind1       = 5/$uren;
    $vind1       = round($vind1);
    $vind1       = rand(0,$vind1);
    $vind        = rand(900,$uren*60*60);
    
    
    mysql_query("INSERT INTO `detective` (`tijd`,`uren`,`zoeker`,`naam`,`status`,`vind`,`land`) values(NOW(),'$uren','$data[login]','$naam','0','$vind','0')");
    mysql_query("UPDATE `users` SET `contant`=`contant`-'$geld' WHERE `login`='$data[login]'");
    print "<table width=100%><tr><td class=maintxt>De detective is bezig met zoeken.</tr></td>";
    }
    }
    print "</td>
    ";
    
    
    if(isset($_POST['wis'])) {
    $id               = $_POST['id'];
    mysql_query("DELETE FROM `detective` WHERE `id`='$id'");
    print "<table width=100%><tr><td class=maintxt>Je hebt de detective ontslagen.</tr></td>";
    }
    if( $_POST['wissen'] ){
    mysql_query("DELETE FROM `detective` WHERE `zoeker`='$data[login]'");}
    
    
    		print "	<form method=post>";
    	print "
    	
    	
    	<table width='80%' cellpadding='2' cellspacing='1'>
    	<tr><td class=subtitle colspan=4>huidige zoekacties</td></tr>
    	<tr><td class=maintxt><b>Naam:</b></td><td class=maintxt><b>Tijd bezig:</b></td><td class=maintxt><b>Land:</b></td><td class=maintxt width=50><b>annuleren:</b></td></tr>";
    
    
    
    
    $detectives2        = mysql_query("SELECT *,UNIX_TIMESTAMP(`tijd`) AS `tijd`,0 FROM `detective` WHERE `zoeker`='$data[login]'");
    
    
    while($detectives = mysql_fetch_assoc($detectives2)) {
    $tijd             = $detectives[tijd]+$detectives[uren]*60*60-time();
    $tijd2            = $tijd-3600;
    $tijd1            = date("H:i:s", "$tijd2");
    $zoeker           = mysql_query("SELECT * FROM `users` WHERE `login`='$detectives[naam]'");
    $zoeker           = mysql_fetch_assoc($zoeker);
    $land1         = array("Bezig","$city_1","$city_2","$city_3","$city_4","$city_5","$city_6");
    $land          = $land1[$detectives[land]];
    
    
    
    
    
    
    if($detectives[tijd] + $detectives[vind] < time() && $detectives[vind] !=0){
    mysql_query("UPDATE `detective` SET `land`='$zoeker[land]', `status`='1' WHERE `id`='$detectives[id]'");
    }
    
    
    if($tijd <1){
    $tijd1 = "Gefaald";
    }
    
    
    if($detectives[status] ==1){
    $tijd1          = "Gevonden";
    }
    
    
    	print " <tr><td class=maintxt>{$detectives[naam]}</td>  <td class=maintxt><b>{$tijd1}</b></td>  <td class=maintxt>{$land}</td><td class=maintxt><input class=\"mod_submit\"type=radio name=id value={$detectives[id]}></td></tr>";
    	}
    
    
    print " <tr><td class=\"maintxt\" colspan=4><input class=\"mod_submit\" type=\"submit\" value=\"Ontslaan!\" name=\"wis\"></td></tr>";
    
    
    ?>
    
    
    </div></div></div>
    </table>
    </table></table></table>
    Toon Meer

    Iemand wellicht een idee wat ik nu (weer) ben vergeten?

    Promoot je site gratis op http://www.gamevote.nl

  • Axl_H
    WAN\'T TO LEARN SOMETHING
    Berichten
    1.465
    • 1 juni 2010 om 09:45
    • #5

    Misschien ligt het aan die ene short tag.

  • gamecontrol
    Professional
    Berichten
    699
    • 1 juni 2010 om 12:44
    • #6

    Welke bedoel je? Zou je de regel kunnen aangeven?

    Promoot je site gratis op http://www.gamevote.nl

  • Axl_H
    WAN\'T TO LEARN SOMETHING
    Berichten
    1.465
    • 1 juni 2010 om 12:53
    • #7

    De eerste regel, zet dit ook in de eerste regel:

    PHP
    error_reporting(E_ALL|E_STRICT);

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!

Maak een account aan Login

ICT Nieuws

  • Datalek bij leverancier Canvas - Universiteit van Amsterdam

    ICTscripters 10 mei 2026 om 12:03
  • Data privacy in 2026: Hoe de naleving van GDPR verandert

    ICTscripters 8 mei 2026 om 12:16
  • Tech.eu - Europees Start-up, Financiering en Technologienieuws

    ICTscripters 7 mei 2026 om 12:15

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37

Gebruikers die dit topic bekijken

  • 3 Gasten
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacy Policy
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen | Beste Zetes eid kaartlezer webshop
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design