A frequently asked question. The usual approach is to prepare stock solutions of the monobasic and dibasic salts of either potassium or sodium phosphate. The solutions are mixed together in a specific proportion to obtain the desired pH. The proportions may be obtained from a table. Such tables can be found online, for example:
Alternatively, if you have a pH meter and a magnetic stirrer you can mix the two solutions together until you get the pH you want. For example, if you want a 0.1M sodium phosphate buffer, mix together solutions of 0.1M monobasic sodium phosphate (an acidic solution) and 0.1M dibasic sodium phosphate (a basic solution) until the pH meter reads 7.4.
About the preparation of a sodium phosphate buffer of pH = 7.4, you may check ‘Cold Spring Harbor Protocols’ at: http://cshprotocols.cshlp.org/content/2006/1/pdb.rec8303