Exercise from PHP5 Social Networking