News
Quick Tip - How to Connect to MySQL using Perl
This is a Quick Tip on how to connect to a MySQL database using Perl. Even though many other languages are sneaking their way onto Perl’s turf. There is still a great demand for Perl on the web, so don’t forget one of it’s primary uses. Here’s the code:
#!/usr/bin/perl
use DBI;
$database = “DATABASENAME”;
$hostname = “db.DOMAIN”;
$port = “3306″;
$username = “USERNAME”;
$password = ‘PASSWORD’;
$dsn = “DBI:mysql:database=$database;host=$hostname;port=$port”;
$dbh = DBI->connect($dsn, $username, $password) or die(”Could not connect!”);
$dbh->disconnect;
First we have to tell perl to use the DBI module. Define our variables. Then define the database information. Finally we’re able to connect to our database. This could be done in one line, but you’ll find that most people prefer to connect their scripts this way for clarity. That’s all. Thanks for reading…
Quick Tip - How to connect to MySQL with PHP
This is a Quick Tip on how to connect to MySQL with PHP. We have all done it from time to time, but sometimes we forget just how to connect to those pesky MySQL databases directly using PHP. So here’s how it’s done:
<?php
function open( ){$db = mysql_connect( ‘localhost’, ‘root’, ‘password’ );
} ?>
Here we have custom a function “open”. Followed by the mysql_connect function which we will supply the url, username, and password. It’s pretty simple to do in PHP. Thanks for reading …
Setting up a Website Testing Server with Xampp
More times then not I have needed the use of a webserver to test various portions or web design that I’m working on for a client. In years past, this was not the easiest thing to do. You would first have to download your web server, and configure it for your system. Then you would have to track down, download, configure, and install various modules, extensions, and runtimes like Perl or PHP. In the end it was always a big hassle, and you were rarely able to install identical loads on two different machines.
Not anymore. Today there are a number of really good pre-configured web servers available that handle the job well. One of the most well known of these is Xampp. It consists of an Apache web server loaded with all the typical extensions. There are even several load package options available. If you want Tomcat, no problem. Don’t want PHP? They even have a bare version for a minimal install. No matter what your testing needs, more then likely Apache Friends has an answer, or they can help you find one. Now lets look at the install:
1. Go to the Apache Friends website and download the distribution of Xampp for your OS. If your not sure which one to get I would recommend getting the standard version with the installer. Save the file to an easy to find location on your hard drive.
2. Find the file on your hard drive, and start the install by double clicking it. The install works pretty much like any other installer. Just follow along as the main program is installed.
3. Once the install is complete you should see a dialog like the one below. If not you can go to the Apache Friends folder in the start menu and select “Xampp Control Panel”

4. Start Apache and MySQL. You will have to select if you want to run Xampp as a service or to start and stop it manually. If your only using Xampp as a test server, running it manually is your best option. If it runs as a service then it will be active all the time just burning up CPU cycles.
5. Open up your web browser and type in “localhost”. If you see the bright orange website of Xampp, your done.
That was easy. At this point your web server is up and ready for your website. I would go through and look at some of the examples, and set up the root password for MySQL. If you close the Xampp Control Panel dialog it will sit in the try for when you need it again. Apache Friends has a great site with even better documentation, so stop by there and read up if your still a little lost. Good luck.
10 Great Technical Writing Tips
Technical writing is a skill that will not only help you to better understand a software or system that you are working with, but also will help you to build credibility before others in an organization, especially as a knowledge expert regarding the topic or areas you are covering in your documentation.
Tutorials
Recent Illustrator Tutorials
Beginner Adobe Illustrator Mountain Sunset Tutorial Part 1
Beginner Adobe Illustrator Cherry Tutorial
Adobe Illustrator Ladybug Tutorial Part 3 - Usage
Next Illustrator Tutorial Teaser
Adobe Illustrator Ladybug Tutorial Part 2
Adobe Illustrator Ladybug Tutorial Part 1
Illustrator Floral Vine Tutorial
Adobe Illustrator Tutorial : How to Draw a Simple Daisy
View All Illustrator Tutorials
Recent Web Development Tutorials
Quick Tip - How to Connect to MySQL using Perl
Quick Tip - How to connect to MySQL with PHP
Setting up a Website Testing Server with Xampp
Website Template Construction from the Ground up Part 2 - Layout
Website Template Construction from the Ground up Part 1 - Design and Foundation Brainstorming
View All Web Development Tutorials
