Code
PHP: Establish Class for MySQL Connections
Tuesday, 18 November 2008 | Jason SlaterBasic Class for creating a database connection
Class MySQLConnection { // ———————– // variable initialisation // ———————– var $SERVER = “hostname”; // Server name var $USER = “dbusername”; // Database username var $PWD = “dbpassword”; // Database password var $DBNAME … Read More
PHP: Removing HTML Tags from Strings
Tuesday, 28 October 2008 | Jason Slater | 2 CommentsUsing text fields on web based forms to obtain information from a website user can often lead to unexpected string inputs. A typical unexpected input might be a field that asks a user to submit a link and a description – spammers … Read More
PHP: Session Variables
Wednesday, 22 October 2008 | Jason SlaterSession variables used to need registering however now they are more in line with _POST variables, so:
On the page to activate Session Handling use
session_start();
You can always check the Session is working by obtaining the Session ID using
… Read More
Download: HTML Special Characters Poster
Friday, 3 October 2008 | Jason SlaterRemembering the code or entity combinations for special characters when designing HTML pages can be a chore so I have been jotting them down as they crop up. Having a few moments spare I have put them together and uploaded … Read More
PHP: Process Technorati API
Friday, 3 October 2008 | Jason SlaterProcessing the Technorati API allows you to receive information about your blog and rankings logged with the Technorati service. An example of extracting various pieces of information is here
$url = “www.yourchosendomain.com”; $apikey = “putyourapikeyhere”; $service = “http://api.technorati.com/bloginfo?key=” . $apikey … Read More