<?php
ini_set('display_errors', 1); 
  include("dbconnect.php");
  
isAdmin();
CheckLogin();
if(isset($_POST['submit']))
{
  
    $id         = $_SESSION['id'];
    $username   = $_SESSION['myusername'];
    $naam       = $_POST['naam'];
    $anaam      = $_POST['anaam'];
    $woonplaats = $_POST['woonplaats'];
    $games      = $_POST['games'];
    $msn        = $_POST['msn'];
    $favgame    = $_POST['favgame'];
    $favgun     = $_POST['favgun'];
    $favgungame = $_POST['favgungame'];
    $manu       = $_POST['manu'];
    $info       = $_POST['info'];
    $avatar     = $_POST['avatar'];
    $pro        = $_POST['pro'];
    $rmem       = $_POST['rmem'];
    $hdd        = $_POST['hdd'];
    $vcard      = $_POST['vcard'];
    $scard      = $_POST['scard'];
    $shp        = $_POST['shp'];
    $mou        = $_POST['mou'];
    $keyb       = $_POST['keyb'];
    $opsys      = $_POST['opsys'];
    $info       = $_POST['info'];
    $avatar     = $_POST['avatar'];
  
        $update = mysql_query("UPDATE accounts SET
        naam             =         '".$naam."',
        anaam            =         '".$anaam."',
        woonplaats       =         '".$woonplaats."',
        msn              =         '".$msn."',
        games            =         '".$games."',
        favgame          =         '".$favgame."',
        favgun           =         '".$favgun."',
        manu             =         '".$manu."',
        pro              =         '".$pro."',
        rmem             =         '".$rmem."',
        hdd              =         '".$hdd."',
        info             =         '".$info."',
        avatar           =         '".$avatar."',
        vcard            =         '".$vcard."',
        scard            =         '".$scard."',
        shp              =         '".$shp."',
        mou              =         '".$mou."',
        info             =         '".$info."',
        avatar           =         '".$avatar."',
        keyb             =         '".$keyb."',
        opsys            =         '".$opsys."'
        WHERE 'username' = '".$_SESSION['myusername']."'") or die (mysql_error());
        if(!$update){
            echo "er is een fout opgetreden!";
        }else{
            echo "Gegevens zijn correct toegevoegd";
        }
}
if(!isset($_POST['submit']))
{
$select = mysql_query ("SELECT * FROM accounts WHERE username = '".$_SESSION['myusername']."'");
$data = mysql_fetch_assoc($select);
   }   
?> 
 


Hij doet de post wel maar hij doet geen veranderingen in de Database
Nòg een topic over je formulier?!
@Nicolas: Maak er geen gewoonte van. Je kunt gewoon in het reeds bestaande topic verder gaan. Trouwens, zoals bovenstaande post is, dat is niet correct. Lees ook de FAQ eens door.

Ook dit topic sluit ik.

Reageren