A PhP program to select album names from album mysql table, Did not understand usage of IF at preparing the statement? why should use IF at all? : $sql = "SELECT album_name FROM albums WHERE artist_id=?";
	if($stmt = $link->prepare($sql)) // Doubt: why should you use if statement, can't we just write it without if statement?
	{
		$stmt->bind_param('i', $_POST['artist']);
		$stmt->execute();
		$stmt->bind_result($album);
		while($stmt->fetch()) {
			printf("Album: %s<br />", $album);
		}
		$stmt->close();
	}
 // Close the connection
	$link->close();