i am makin a simple account creation screen for my website and i have an error: Error: No database selected and i dont know why im getting this because i have used mysql_select_db(), heres my code:

			$con = mysql_connect("localhost");
			if (!$con)
				echo "Could not connect:" . mysql_error() . "<br />";
				echo "If you are a visitor, please contact the site author <br />or one of the administrators.";
			mysql_select_db("anzak_site", $con);
			$sql = "INSERT INTO user_accounts (first_name, last_name, age, username, password)" .
			"VALUES" .
			if (!mysql_query($sql, $con))
				echo "Error: " . mysql_error();	
				echo "One(1) record added.";	

any help would be appreciated :)

This is the line that is incorrect (or at least one of them).

$con = mysql_connect("localhost");

Replace it with something like the following but replace the username and password with the real username and real password:

$con = mysql_connect("localhost","username","password");