- Joined
- Aug 8, 2004
- Messages
- 3,892
- Reaction score
- 20
Needlesly complex and even possibly unsecure since you don't check any of your variables. Especially if you plan on using this in combination with a database later on you're leaving yourself pretty much wide open to SQL injects.
Also, instead of <?php echo $current_page; ?> you can simply write <?=$current_page?> (though to be honoust I discourage the use of PHP in HTML alltogether)
Furthermore you check certain pages several times: when for instance you include form.generator.php you already checked in index.php for userlevel. Superflious. Better is to simply disallow direct acces to form.generator.php (by means of a .htacces file for instance) and redirect all requests to your index.php.
Also, you don't close your HTML tags. Not nice. Not to mention the lack of doctype specification - there goes your W3C compliancy.
Lastly, if you want to check for certain values in an array like you do with username in array, simply is if(in_array("needle", "haystack") {**.
Anyway, nice attempt but there is still a lot to improve
Also, instead of <?php echo $current_page; ?> you can simply write <?=$current_page?> (though to be honoust I discourage the use of PHP in HTML alltogether)
Furthermore you check certain pages several times: when for instance you include form.generator.php you already checked in index.php for userlevel. Superflious. Better is to simply disallow direct acces to form.generator.php (by means of a .htacces file for instance) and redirect all requests to your index.php.
Also, you don't close your HTML tags. Not nice. Not to mention the lack of doctype specification - there goes your W3C compliancy.
Lastly, if you want to check for certain values in an array like you do with username in array, simply is if(in_array("needle", "haystack") {**.
Anyway, nice attempt but there is still a lot to improve

