Database PHP Class
I’m back with another chunk of code. This time, it’s my database class. I got sick of coming across classes that didn’t have everything I needed, or didn’t do it correctly. One of my biggest problems was an inability to nest query calls within another query result’s output. Example: <?php // main query // gets a list of companies from the companies table $a = "SELECT id, company_name FROM companies"; $a = $db->query($a); while ($aa = $db->fetch_object($a) ) : echo '<div...
read more(UPDATED 08-10-2010) Forms Class for easy and consistant forms
UPDATED 08-10-2010: I’ve cleaned up a lot of code and organized the code a little better. One major improvement is the passing of element attributes. You can now pass an unlimited number of attributes. If there are any you want omitted from the actual element tag, you can add it to the $attributes_not_allowed array. I’ve added notes everywhere and hopefully they will assist you. If you find any bugs, feel free to post in comments and will fix them ASAP As it states in the notes of the script, this is not for auto-generated forms....
read more