<?php
if (!isset($_SESSION))
{
	session_start();
}
require_once ('header.php');
echo "<h1>Instellingen</h1>";
if ($aangemeld == "ja")
{
	if (ISSET($_POST['save']))
	{
		if($_POST['pass'] != "")
		{
			if($_SESSION['naam'] != "test")
			{
				mysql_query("UPDATE members SET wachtwoord='".$_POST['pass']."' WHERE naam='".$_SESSION['naam']."';");
				$_SESSION['member_pass'] = $_POST['pass'];
				action("veranderd zijn/haar instellingen");
			}
		}
	}
	echo "<table border='0' class='tabel'>";
	echo "<form action='instellingen.php' method='POST'>";
	echo "<tr><td>Wachtwoord: </td><td><input type='password' name='pass' size='30' maxlenght='30' value='".halen("SELECT wachtwoord FROM members WHERE naam='".$_SESSION['naam']."';")."'></td></tr>"; 
	echo "<tr><td colspan='2'><input name='save' type='submit' value='Opslaan'></td></tr>";
	echo "</form>";
	echo "</table>";
}
else
{
	echo "Oeps! Hiervoor moet je aangemeld zijn!";
}
require_once ('footer.php');
?>