<?php
function connectdb()
{
 mysql_connect("localhost:3306", "root", "d3nn1s")
  or die("Error connecting to mysql: " . mysql_error());
 mysql_select_db('save_energy')
  or die("Error connecting to database: " . mysql_error());
}
?>