Well, i won't do the coding for you but you should only need 2 files (unless you want a very clean and easy to work with source, use 4 pages.)
2 file option:
config - connects to database
market - buy/sell pokemon
4 file option:
config - connects to database
list pokemon being traded
page to sell pokemon
page to buy specific pokemon
to connect to a database, we can use the following code:
Code:
<?
$Username = "DATABASE USERNAME";
$Password = "DATABASE PASSWORD";
$Database = "POKEMON DATABASE";
$Host = localhost;
mysql_connect($Host, $Username, $Password);
@mysql_select_db($Database) or die ("Server unable to connect to specified database");
?>
username, password and database will need to be changed to the required (the stuff you use to login and the database you use for pokemon)
Host will be either localhost, or the IP of the database server.
the next line connects to the database server, and the following line tells it to select the database.
That's just basic part of what you will need, you can find loads of tutorials online about it.