This the basic idea of the program:

The server starts and creates a well-known pipe and waits for a client. Whenever a client connects to the server, server waits for client to write sumthing to the well-known pipe. Client will write it's pid, name (a person's name to be looked up in a database) and a char to identify address or phonenumber of the person that client is requesting (a= address or p=phonenumber). Server, then, read this info from well-known pipe and then break down the string into appropriate words(I could've used a string tokenizer, built-in function, but I realized that later. I think, I created a my own string tokenizer.) Using the child's pid, the server creates a private pipe for communicating with the client. Then, the server try to execute the command, on unix system, it formed from the passed-in info from client. If it's successful, then server writes appropriate messages to the client using the private pipe. Then client does some clean up (deletes the private pipe, closes the pipes) and then exits.
NOTE: Server could only handle one client at a time. To handle more than one client, server should have a queue in which client is added. Then, client is popped one at a time and server would then do a fork function call. That newly created child (of the server) would deal with the request from the client. Server would create another child (fork() again) and deal with the second client and so on.)
Here is a sample output (I have blurred some of the things that reveals any information about school's server.)

Here is how I ran it:
Running server:
1) Started a SSH window for the server.
2) I executed the 'ps' command to show that no other process are running
(other than bash and ps itself)
3) I started the server.
4) Server now waits for a connection from client...
Running Client:
1) Opened another SSH window for the client.
2) I executed the 'ps' command to show that no other process are running
(other than bash and ps itself)
3) I executed the 'ls' command to list the files in that current directory.
4) I executed the 'cat' cmd with a2.db as the input.
(a2.db is the database file. Data for each record is seperated with a delimiter ':')
5) Client was started.
6) A name was entered; in this case, Mark, since that name is in the database.
7) 'a' was entered to see Mark's address from the database.
8) Client output the results.
(Client exited - automatically.)
9) Client was started again.
10) Will Smith was entered as the name.
11) 'p' was entered to see Will Smith's phonenumber.
12) Client out put the results and exited.
13) I ran the 'dir' command to show that all the pipes have been removed.
(if 'dir' don't work use 'ls')
14) Server was killed by pressing "CTRL + C"
If the above paragraph is confusing, then try reading the code, which is lot easier to understand.
Code:
http://cid-3e83bfd71e4816b4.skydrive.live.com/browse.aspx/Public/cProgrammingServerClient
