PHP

Here is an example of how to select some data from a table on one database and insert into a table of a different database. I assumes that you are using the same mysql connection.

The MySQL USE command is used to select the appropriate database at the appropriate time. database1 is where the data is being selected from and database2 is where it is inserted to.

Basic while loop. It selects everything from a table called "table1" and then loops through each row. On each iteration, you can do something with the value for a specficied field. In this case, we echo out the values of the id and "anotherfield" fields.

This is for the basic snippet to connect to a MySQL database.

WeBuilder Review

I came across WeBuilder about a year ago I started looking into various code editors. I was using Dreamweaver at the time. While Dreamweaver is a good product, I always felt that there was probably a product out there that was better and more time efficient. I was mainly looking for a PHP Editor and was willing to use Dreamweaver for HTML and CSS, but a combined editor would have been ideal.

Create Random Home Page Images

Displaying random images on a home page can add real impact. It ensures that your home page is always fresh, because when a visitor returns to the home page, a new image will appear.

Here are a few examples of random images in action. When you visit the home page on these sites, keep clicking refresh and you will see that the main image changes.

phpDesigner Review

I have been on the hunt for a better PHP editor or IDE (Integrated Development Environment). phpDesigner made my short list and has received positive reviews elsewhere. I have tested it out, and here is what I think of it:

phpDesigner is one of the most popular PHP IDE's on the market. At 39 Euros it is an absolute steal compared with the more expensive IDE's, like Zend Studio ($299). It is packed with features that should speed up your development time.

Directory for PHP Geeks

Ok, so there are plenty of sites for PHP geeks. But this is the daddy geek site! It is a directory full of really useful PHP websites. It is great for finding open source class libraries, tutorials, articles, tools and the like.

PHP Directory

Testing PHP Editors and IDEs

I have finally had enough of coding PHP in Dreamweaver and am on the hunt for a dedicated PHP editor or IDE (Intergrated Development Environment) to use instead. Dreamweaver is great for HTML and CSS, but does quite cut it for PHP. My objective is to improve productivity.

The End of the Line for PHP 4

The PHP development team have announced that PHP 4 will not be supported from the end of 2007. That means that there will be no more releases of PHP 4 from then on. Critical security fixes will be made on a case by case basis up to August 8th 2008.

Preventing SQL Injection

Many web developers ignore the threat of SQL Injection, or are oblivious to it. It is one of the most serious security threats and can result in a corrupted, amended, viewing of sensitive information or even a deleted database. Thankfully, it is fairly easy to protect websites from SQL injection attacks.