Als ik op deze admin pagina getallen invoer voor in de database te zetten, verandert hij niets in de database..
PHP
<?
//Script laden zodat je nooit pagina buiten de index om kan laden
include("includes/security.php");
$gebruikers = mysql_fetch_assoc(mysql_query("SELECT * FROM gebruikers WHERE user_id = '".$_SESSION['id']."'"));
//admin controle
if($gebruiker['admin'] < 1) header('location: index.php?page=home');
if(isset($_POST['gift'])){
mysql_query("UPDATE mystery_gift SET `code`='".$_POST['code']."', `silver`='".$_POST['silver']."', `gold`='".$_POST['gold']."', `premium`='".$_POST['premium']."', `respect`='".$_POST['respect']."', `respectp`='".$_POST['respectp']."', `pokemon_id`='".$_POST['pokemon_id']."'");
echo"<div class='green'>Gelukt!</div>";
}
?>
<table width="300" border="0" cellpadding="0" cellspacing="0">
<tr width="300">
<td width="250" class="top_first_td"><b>Wat</b></td>
<td width="100" class="top_td"><b>Aantal</b></td>
</tr>
</table>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Code:</td>
<td width="100" align="left"><input type='text' id='tags' name="code" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Silver:</td>
<td width="100" align="left"><input type='text' id='tags' name="silver" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Gold:</td>
<td width="100" align="left"><input type='text' id='tags' name="gold" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Premium:</td>
<td width="100" align="left"><input type='text' id='tags' name="premium" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Respect:</td>
<td width="100" align="left"><input type='text' id='tags' name="respect" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Respectpunten:</td>
<td width="100" align="left"><input type='text' id='tags' name="respectp" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left">Pokemon:</td>
<td width="100" align="left"><input type='text' id='tags' name="pokemon_id" value="" class="text_long" /></td>
</tr>
</table>
</form>
<form method="post">
<table width="300">
<tr width="300">
<td width="250" align="left"><input type="submit" name="gift" value="Maak gift" class="button" /></td>
</tr>
</table>
</form>
Toon Meer