4.05.2005

Talking to MySQL 4.1 through PHP 5

Well,
I finally got my PHP code to talk to MySQL 4.1. I ended up installing the latest version of PHP 5.0.4 which came out last week. There are some difference between older verions of MySQL beingable to read the "password" parameter when connecting to a MySQL database. I thought I was going to have to use a trick that I found to run an old_password() routine, but I didn't. I did notice that PHP 5 changes some syntax in creating and using variables from previous versions...such as using $_REQUEST, $_GET, $_POST instead of just setting regular variables such as $name. Also, the use of single quotes seems to be used more often than double quotes for variables.

So I am now able to connect to MySQL database, put data in and post data back all through a web interface. More to come on my quest for a database driven website. Check out tutorial informatinon from SitePoint and Build Your Own Database Driven Website Using PHP & MySQL by Kevin Yank.

No comments: