PHP VS ASP.NET - Connecting to Database.
Tuesday, March 20th, 2007Continue the series of PHP VS ASP.NET. My previous post covered the installations of both MySQL and MSSQL database on Windows XP Pro. Today we are going to connect to the database programmatically, as in using the database along with your server-side scripts.
PHP
PHP + MySQL is always my favorite combo for web application. The connection to MySQL database in PHP is fairly simple.
Codes:
<?php
$conString = mysql_connect(“host”, “username”, “password”);
mysql_select_db(“databasename”, $conString);
?>


