PHP-Code:
// Kontostand abfragen
$kontodaten = mysql_fetch_array(db_query("SELECT kontostand FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']." LIMIT 1"));
head("Formular");
if ($_POST['form1'] && $kontodaten['kontostand'] >= '5000000') {
echo'Formular 1'; // Formular 1
} elseif ($_POST['form2'] && $kontodaten['kontostand'] >= '5000000') {
echo'Formular 2'; // Formular 2
} elseif ($kontodaten['kontostand'] >= '5000000') {
echo'<form action="" method="post"><input type="submit" name="form1" value="Formular 1"></form>';
echo'<form action="" method="post"><input type="submit" name="form2" value="Formular 2"></form>';
} else {
echo'Nicht genug Lose'; // Fehlermeldung
}
foot();