I don't think the bit matters its their processing engine that matters and I think the code is the same regardless of version.
<?php
$host="localhost";
$username="root";
$password="";
$db_name="users";
$tbl_name="users table";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
?>
what db are you using?