the problem is in this code, is that supposed to fill in the form, click submit, it goes blank and does not add, and of course I ask for help because I'm new at this and something is, but not so much lol, who help me fix this little code will give you rep + hehe
Thanks =)
PHP:
if(IsSet($_POST['lvl'])) {
if(empty($add)) {
$lvl = $_POST['lvl'];
$descrip = $_POST['descrip'];
$rewards = $_POST['rewards'];
$main_content .= '<form action="" method="post"><B>Enter Level Quest:</B><input type="textbox" name="lvl"><br>
<B>Description from quest:</B><input type="textbox" name="descrip"><br>
<B>Name of rewards:</B><input type="textbox" name="rewards"><br><br><input type="submit" value="Submit">
</form></center><form action="?subtopic=questsystem&add" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
} else {
$SQL->query('INSERT INTO `z_quest_system` (id, lvl, descrip, rewards) VALUES (NULL, '.$lvl.', '.$descrip.', '.$rewards.')');
$main_content .= '<b><center>The quest has been <i>successfully added</i>!</b></center><br>
<form action="?subtopic=questsystem" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
}
}
Thanks =)