René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Connecting to a MySQL database with PHP

<?php

  $servername = 'localhost';
  $username   = 'rene'     ;
  $password   = 'renes_pw' ;

  $db_conn = mysql_connect($servername, $username, $password);

  if (! $db_conn) {
    printf("<b>Connect failed</b>: %s\n", mysql_error());
  }
  else {
    print('<b>Connect successful</b>');
  }

?>