• 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

  • Beta-testers gezocht voor Crypto-oefenplatform

    Syntax 29 januari 2026 om 16:11
  • Na 15 jaar terug van weggeweest: iCriminals.nl is terug (BETA)!

    Syntax 19 januari 2026 om 09:34
  • Developer Gezocht

    Mikevdk 10 januari 2026 om 18:57
  • Op zoek naar de legends

    Syntax 5 januari 2026 om 13:50
  • [FREE] WeFact Hosting module

    Jeroen.G 13 oktober 2025 om 14:09
  • Help testers nodig voor android app Urgent

    urgentotservices 26 september 2025 om 10:21
  • Versio vervanger

    Jeroen.G 25 augustus 2025 om 15:56
  • Afspraken systeem met planbeperking

    Lijno 1 augustus 2025 om 23:04

Marktplaats

  • 321 Nieuwe Domeinnamen December 2025

    shiga 1 januari 2026 om 10:26
  • Meerdere mafia game template te koop

    Syntax 26 december 2025 om 00:07
  • Van een pixelige afbeelding naar een strakke, moderne website

    Syntax 21 december 2025 om 17:05

Undefined index error

  • xtreempje
  • 20 oktober 2011 om 14:24
  • xtreempje
    Student
    Berichten
    152
    • 20 oktober 2011 om 14:24
    • #1

    Hallo, ik heb lang geleden best veel met php gewerkt maar ben heel veel vergeten en heb nu een foutmelding en ik kan hem niet oplossen.

    PHP
    Notice: Undefined index: purchased in C:\xampp\htdocs\prolo\index555.php on line 8
    
    
    Notice: Undefined index: money in C:\xampp\htdocs\prolo\index555.php on line 9
    
    
    Notice: Undefined index: attack in C:\xampp\htdocs\prolo\index555.php on line 10
    
    
    Notice: Undefined index: defense in C:\xampp\htdocs\prolo\index555.php on line 11


    ik wil dat mijn health uit mijn database wordt weergegeven netzoals mijn naam.

    PHP
    Username : xtreempje
    Health :
    Notice: Trying to get property of non-object in C:\xampp\htdocs\prolo\index555.php on line 64
    
    
    Attack :
    Notice: Undefined variable: attack in C:\xampp\htdocs\prolo\index555.php on line 70
    
    
    Defense :
    Notice: Undefined variable: defense in C:\xampp\htdocs\prolo\index555.php on line 74
    Toon Meer

    pagina met de error :

    PHP
    <?php require_once 'auth.php'; ?>
    <?php require_once 'connection.php';?>
    
    
    <?php
    $email = $_SESSION['email'];
    $purchased = $_SESSION['purchased'];
    $money = $_SESSION['money'];
    $purchased = $_SESSION['attack'];
    $money = $_SESSION['defense'];
    
    
    ?>
    
    
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </head>
    <body style='min-height:380px'>
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='title_graphic'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
    	<form method="post" action="login.php">
    
    
      <div style="margin:0;padding:0"></div>
    <div class='field text_field'>
    <text-
    <label for="username" name="username" id="username"><strong><h2>Welcome</h2></strong></label>
    <p><br />
      <label for="custom" name="custom" id="custom">Username</label> 
      : 
      <label for="custom" name="custom" id="custom"><strong><?php echo $user; ?></strong></label>
      <br />
      <label for="custom" name="custom" id="custom">Health</label>
      <label for="custom" name="custom" id="custom"><strong>:</strong></label>
      <label for="custom" name="custom" id="custom"><strong><?php echo $user->health; ?></strong></label>
    </p>
    <p>
      <label for="custom3" name="custom" id="custom"><strong></strong></label>
      <label for="custom3" name="custom" id="custom">Attack</label>
      <label for="custom3" name="custom" id="custom"><strong>:</strong></label>
      <label for="custom3" name="custom" id="custom"><strong><?php echo $attack; ?></strong></label>
    <p>
      <label for="custom4" name="custom" id="custom">Defense</label>
      <label for="custom4" name="custom" id="custom"><strong>:</strong></label>
      <label for="custom4" name="custom" id="custom"><strong><?php echo $defense; ?></strong></label>
      </p>
    </div>
      </br>
      </strong>
      <label for="custom3" name="custom" id="custom"><br />
    </label>
      <p>&nbsp; </p>
    </div></strong></div>
    </br>
    </div>
    <tr><td colspan=2><font face="verdana,arial" size=-1> Logout <a href="login.php?action=Logout">here</a>!</
    <br />
    <br />
    </div>
    
    
    </div>
    </div>
    <div class='actions'>
    </div>
    <img alt="Sm_loader" class="right" id="loading_spinner" src="sm_loader.gif" style="margin-top:13px;display:none;" />
    
    
    <div class="clear"></div>
    </div>
    
    
    <br />
    
    
    <br />
    <a href="/corp/home"></a>
    <div class="clear"></div>
    
    
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    Toon Meer


    mijn login.php

    PHP
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    <?php
    require_once 'connection.php';
    
    
    if (!isset($_REQUEST['action'])) {
    		  ?>
    
    
    <body style='min-height:380px'>
    <input id="auth_token" name="auth_token" type="hidden" value="ZMbisHfLMZJvtD0D0C61bofjI5CrlWKMyFJ6iIza8L4=" />
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='title_graphic'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
      <form action="login.php" class="onboard_form" method="post"><div style="margin:0;padding:0"></div>
      <b><font color="red"><font face="verdana,arial" size=-5>No data filled in.</font></font></b>
    <div class='field text_field'>
    <label for="username" name="username">Username</label>
    </div>
    <div class='another_row'>
    <input class="autotab behavior" id="email" name="email" tabindex="1" type="text" />
    </div>
    <div class='field text_field'>
    <label for="password" name="password">Password</label>
    <span> 
    &nbsp;&nbsp;
    
    
    </span>
    
    
    </div>
    <div class='one_more_row'>
    <input id="password" name="password" tabindex="2" type="password" value="" />
    </div>
    <div class='remember_me_field'>
    <div class='field check_box_field'>
    <input id="remember_me" name="remember_me" type="checkbox" value="1" />
    <label for="remember_me" style="display:inline">Stay signed in</label>
    </div>
    </div>
    <div class='actions'>
    <div class="right gistsubmit" onclick="document.getElementById(&quot;loading_spinner&quot;).style.display = &quot;inline&quot;;"><input name="commit" type="submit" value="Sign In" /><span></span></div>
    <img alt="Sm_loader" class="right" id="loading_spinner" src="sm_loader.gif" style="margin-top:13px;display:none;" />
    
    
    <div class="clear"></div>
    </div>
    <input id="time_zone_offset" name="time_zone_offset" type="hidden" value="-8" />
    <input id="from_openid" name="from_openid" type="hidden" />
    <input id="version" name="version" type="hidden" />
    <br />
    <a href="/users/new">Create account</a><br />
    <a href="/users/forgot_password?from_openid=false">Forgot password?</a>
    <br />
    <a href="/corp/home"></a>
    <div class="clear"></div>
      </form>
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    <script src="/javascripts/pages/login_page.js?0ae7d22b16" type="text/javascript"></script>
    </div>
    </div>
    </div>
    </body>
    </html>
              
    <?php
    } else {
      switch ($_REQUEST['action']) {
        case 'Register':
    
    
          if (!isset($_REQUEST['action'])) {
            header ('refresh: 3; url=register.php');
            die ('No form has been submitted');
          } else {
    
    
            $user = $_POST['username'];
            $pass = $_POST['password'];
            $pass2 = $_POST['check_password'];
    		$email = $_POST['email'];
    		
    		
    
    
    				if (empty($user)) 
    				{
              echo ('Please fill in an username.</br>');
    			} if  (empty($pass))
    				{ 
    		echo ('Please fill in an password.</br>');
    				} if (empty($pass2))
    				 { 
    		 echo('Your password did not match.</br>'); 
    				 } if (empty($email))
    				 {
    		 echo('Please fill in an email.</br>');
    	
    	
    		
            } elseif ($pass != $pass2) {
              header ('refresh: 3; url=register.php');
              die ('Passwords do not match');
    
    
            } elseif (!get_magic_quotes_gpc()) {
              $user = addslashes($user);
              $pass = addslashes($pass);
            }
    
    
            $pass = addslashes(sha1($pass));
            $user = addslashes(base64_encode($user));
    
    
            $check_sql = "SELECT username " .
                         "FROM users " .
                         "WHERE username='$user'";
    
    
            $sql = "INSERT INTO users (username, password, email) " .
    "VALUES ('" . $user . "','" . $pass . "','" . $email . "')";
    
    
    
    
            $check_result = mysql_query($check_sql, $conn)
                              or die ('Could not check up user account; ' . mysql_error());
    
    
            if ((mysql_fetch_array($check_result)) != 0) {
              header ('refresh: 3; url=register.php');
              die ('Username bestaat al');
            }
            mysql_query($sql, $conn)
              or die ('Could not create account; ' . mysql_error());
    
    
            header ('refresh: 3; url=index.php');
            echo ('Account created');
            break;
          }
    
    
        case 'Login':
          if (!isset($_REQUEST['action'])) {
            header ('refresh: 3; url=index.php');
            die ('No form has been submitted.');
          } else {
    
    
            $user = $_POST['username'];
            $pass = $_POST['password'];
    
    
            if (empty($user) || empty($pass)) {
              header ('refresh: 3; url=index.php');
    		  ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </head>
    <body style='min-height:380px'>
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='loginheader'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
    	<form method="post" action="login.php">
    
    
      <div style="margin:0;padding:0"></div>
    <div class='field text_field'><br>
    <label for="username" name="username" id="username"><center>Logging In, Please wait <img src="sm_loader.gif"></center></label>
    </div>
    
    
    <div class='one_more_row'>
    <div class="clear"></div>
    </div>
    
    
    <br />
    <br />
    <div class="clear"></div>
    
    
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
              
    <?php
            } elseif (!get_magic_quotes_gpc()) {
              $user = addslashes($user);
              $pass = addslashes($pass);
            }
            $pass = addslashes(sha1($pass));
            $user = addslashes(base64_encode($user));
            $sql = "SELECT id, username, password, email, money, purchased, attack, defense " . 
                   "FROM users " .
                   "WHERE username='$user' " .
                   "AND password='$pass' ";
    
    
            $result = mysql_query($sql, $conn)
              or die ('Could not check up user account; ' . mysql_error());
    
    
            if (($row = mysql_fetch_array($result)) == 1) {
              header ('refresh: 0; url=invailed.php');
    		  
              ?>
    		  
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </head>
    <body style='min-height:380px'>
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='loginheader'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
    	<form method="post" action="login.php">
    
    
      <div style="margin:0;padding:0"></div>
    <div class='field text_field'><br>
    <label for="username" name="username" id="username"><center>Logging In, Please wait <img src="sm_loader.gif"></center></label>
    </div>
    
    
    <div class='one_more_row'>
    <div class="clear"></div>
    </div>
    
    
    <br />
    <br />
    <div class="clear"></div>
    
    
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    		  
    		  <?php
    		  echo ('Username and password does not match.');
    		  
            } else {
    
    
              session_start();
              $_SESSION['id'] = $row['id'];
              $_SESSION['username'] = stripslashes($row['username']);
              $_SESSION['password'] = stripslashes($row['password']);
    		  $_SESSION['email'] = stripslashes($row['email']);
    		  $_SESSION['email'] = stripslashes($row['money']);
    		  $_SESSION['email'] = stripslashes($row['attack']);
    		  $_SESSION['email'] = stripslashes($row['defense']);
            }
            header ('refresh: 3; url=index2.php');
            ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </head>
    <body style='min-height:380px'>
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='loginheader'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
    	<form method="post" action="login.php">
    
    
      <div style="margin:0;padding:0"></div>
    <div class='field text_field'><br>
    <label for="username" name="username" id="username"><center>Logging In, Please wait <img src="sm_loader.gif"></center></label>
    </div>
    
    
    <div class='one_more_row'>
    <div class="clear"></div>
    </div>
    
    
    <br />
    <br />
    <div class="clear"></div>
    
    
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    
    
    <?php
    
    
      	break;
          }
        case 'Logout':
          session_start();
          session_unset();
          session_destroy();
    
    
          header ('refresh: 3; url=index.php');
     ?>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta content='text/html; charset=iso-8859-1' http-equiv='Content-type' />
    <meta content='width=330, height=400, initial-scale=1' name='viewport' />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>Please Log in.</title>
    
    
    <link href="login.css" media="screen" rel="stylesheet" type="text/css" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </head>
    <body style='min-height:380px'>
    <div class='layout' id='page'>
    <div class='centered'>
    <div class='column' style='margin-top:-174px'>
    <div class='logo'></div>
    <div class='login_page preserve_links'>
    <div class='logoutheader'></div>
    <div class='login_frame flexible'>
    <div class='top'></div>
    <div class='middle'><div class='flash_message'>
    <div class='flash_boxes'>
    
    
    </div>
    
    
    </div>
    	<form method="post" action="login.php">
    
    
      <div style="margin:0;padding:0"></div>
    <div class='field text_field'><br>
    <label for="username" name="username" id="username"><center>Logging out, Please wait <img src="sm_loader.gif"></center></label>
    </div>
    
    
    <div class='one_more_row'>
    <div class="clear"></div>
    </div>
    
    
    <br />
    <br />
    <div class="clear"></div>
    
    
    </div>
    
    
    <div class='bottom'></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    
    
          <?php
          break;
      }
    }
    
    
    ?>
    Toon Meer

    en mijn auth.php

    PHP
    <?php
    session_start();
    require_once 'connection.php';
    
    
    $id = $_SESSION['id'];
    $user = $_SESSION['username'];
    $pass = $_SESSION['password'];
    
    
    if (empty($id) || empty($user) || empty($pass)) {
      session_unset();
      session_destroy();
      header ('refresh: 3; url=index.php');
      die ('Session expired.');
    
    
    } elseif (!get_magic_quotes_gpc()) {
      $user = addslashes($user);
      $pass = addslashes($pass);
    }
    
    
    $pass = addslashes($pass);
    $user = addslashes($user);
    
    
    
    
    $sql = "SELECT id, username, password, email, money " . 
           "FROM users " .
           "WHERE id='$id' " .
           "AND username='$user' " .
           "AND password='$pass'";
    
    
    $result = mysql_query($sql, $conn)
      or die ('Could not check up user account; ' . mysql_error());
    
    
    if (($row = mysql_fetch_array($result)) == 0) {
      session_unset();
      session_destroy();
      header ('refresh: 3; url=index.php');
      die ('Session data incorrect');
    } else {
      $user = stripslashes(base64_decode(stripslashes($user)));
    }
    ?>
    Toon Meer

    alsjeblieft help me anders kan ik niet verder :(

  • Guest, wil je besparen op je domeinnamen? (ad)
  • xtreempje
    Student
    Berichten
    152
    • 20 oktober 2011 om 15:53
    • #2

    Nvm heb 't al gevonden.

  • Reza
    Professional
    Ontvangen Reacties
    13
    Berichten
    1.536
    • 20 oktober 2011 om 15:57
    • #3

    En de oplossing.
    Want je moet dat ook melden.

    Met vriendelijke groet,
    Reza.

Participate now!

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

Maak een account aan Login

ICT Nieuws

  • Fijne feestdagen

    tcbhome 28 december 2025 om 13:55
  • Kritieke update voor Really Simple Security-plug-in

    K.Rens 16 november 2024 om 16:12
  • ING Nederland streeft naar ondersteuning van Google Pay tegen eind februari

    K.Rens 2 november 2024 om 16:09

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
  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