Display List In Four Columns .my_list li { display: block; width: 25%; float: left; }
All posts by
Lists General
Lists <ul> <li>Coffee</li> <li>Milk</li> </ul>
Admin Users
Simple Admin User Session Approach The log in / log out page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Admin Log In</title> <?php if ( !isset($_SESSION)) session_start(); //LOG IN URL: // www.my_domain.com/admin_login.php?adminid=somerandomgibberish //LOG OUT URL: // www.my_domain.com/admin_login.php?adminid=0 if ( isset($_GET[‘adminid’]) && ($_GET[‘adminid’] == "somerandomgibberish") ) { […]
Security htaccess rules to include
General security rules See our post here
Error Pages
#———- ERROR PAGE REDIRECTS ———- ErrorDocument 403 http://www.mydomain.com/index.php ErrorDocument 404 http://www.mydomain.com/index.php
Comments
Use the hash character: # Main Menu Links or use at each end if preferred # Main Menu Links #
.Include General
include ('classes/config.php'); include_once ('classes/config.php'); require ('classes/config.php'); require_once ('classes/config.php'); Included Files Corrupting Things Whitespace before or after the php start and end markers White space or any characters before or after the <?php and ?> will be output in the same way as echo(as html) in an included file. This can be a problem, for instance having a line […]
Rewrite rules
Good Resources For Example Rules https://gist.github.com/ScottPhillips/1721489 Before the rules Options +FollowSymLinks RewriteEngine On RewriteBase / No Parameters Example RewriteRule ^groups$ groups.php [L] 1 Parameter Example RewriteRule ^flips/([^/]*)$ flips.php?fid=$1 [L] Converts this URL format: http://www.mydomain.com/flips/996803385327 To this actual php page http://www.mydomain.com/flips.php?fid=996803385327 2 Parameter Example RewriteRule ^flips/([^/]*)/([^/]*)$ flips.php?fid=$1&valueb=$2 [L] Converts this URL format: http://www.mydomain.com/flips/996803385327/hello To this […]
Rollover / Hover Pop Up Text
<a href="some_page.php" title="Some hover rollover text" >Click Here</a>
Merging Arrays
Join Arrays – Only adding unique indexes / keys Merge Arrays