Ye gods. I've been coding PHP for about a year now, and I've noticed there's more than forty ways to do any specific thing. I have to be doing something wrong.
Should I be generating all my dynamic content at the top of my script, and then outputting it through a template? Or should I just output my template and mash code in when I reach the area?
I have index.php with a switch in it, which will include different php files based on $_GET['go']. For example, /index.php?go=write will take me to a page where you can write a blog post. /index.php?go=edit will let you edit those posts... ...should I have separate pages for each of them? (index.php, write.php, edit.php)?
Right now, my login system seems to be so flimsy--to see if the user is logged in or not, it only checks to see if $_SESSION['username'] isn't null. Should I be using the isset() function, or can I just work with
code:
if($_SESSION['username'])
And... ...thats about all I can think of for now...
<? include("signature.php"); ?>