Building your own Myspace.com with PHP Part I: Introduction

Posted by Stefan on July 31st, 2007 at 08:56pm

In this series of tutorials we are going to go through the development of a complete (yet very basic) community system. The final community will allow visitors to sign up and get a personal presentation page, guestbook and a friends list. I have tried to keep the programming as simple as possible and will explain what im trying to do as throughly as possible. It should be fairly easy to follow even if you are very new to programming web applications.

The script will be developed with PHP and we will use MySQL as the database of choice. A complete example of what you will learn to create by following this series of tutorial is available at the following link. You can login with test/test to try it out!. If you want to download the source files they are available here.

Table of contents:

Next part: Designing the database

Under PHP+ Tutorials

13 Comments for Building your own Myspace.com with PHP Part I: Introduction

  • 1. Dark Wolf  |  August 12th, 2007 at 4:14 am

    Thanks!
    I liked! =D

  • 2. ryan  |  August 15th, 2007 at 7:52 pm

    when I set this up, create a user, login, search for friends and then click a friends name, it takes me to that friends page as if I’m logged in as him not me. So in turn any user can edit any profile. also it will never show the “add to friends” because anytime you go to someone else’s page you log in as them. Why is this happening? Your example doesnt do this and I’ve changed no code except for database connection.

  • 3. debug  |  August 22nd, 2007 at 2:49 pm

    “when I set this up, create a user, login, search for friends and then click a friends name, it takes me to that friends page as if I’m logged in as him not me. So in turn any user can edit any profile. also it will never show the “add to friends” because anytime you go to someone else’s page you log in as them. Why is this happening? Your example doesnt do this and I’ve changed no code except for database connection.”

    I have this same problem :/

  • 4. BMW  |  August 26th, 2007 at 4:55 am

    “when I set this up, create a user, login, search for friends and then click a friends name, it takes me to that friends page as if I’m logged in as him not me. So in turn any user can edit any profile. also it will never show the “add to friends” because anytime you go to someone else’s page you log in as them. Why is this happening? Your example doesnt do this and I’ve changed no code except for database connection.”

    I Have the same problem too…

  • 5. Ryan S  |  August 29th, 2007 at 5:23 am

    Thanks for this code! It helped me and my friends in building our social network!

    Peace

  • 6. Nizzo`  |  August 29th, 2007 at 10:50 pm

    V.cool piece of code! Thanks.

  • 7. Concerned  |  September 1st, 2007 at 10:47 pm

    The code on these pages concerns me; all of the scripts that deal with $_GET and $_POST variables pass the values directly into a SQL statement without sanitizing the inputs and are therefore vulnerable to SQL injection exploits. This is a very bad thing.

  • 8. Lucky  |  October 28th, 2007 at 11:43 pm

    This Is Awesome thanks

  • 9. Adam  |  December 10th, 2007 at 12:33 pm

    I second that, Lucky! Great domain as well - Upgrade the Web. I was watching a video yesterday from founder of PHP saying how the Interweb needed to be upgraded because it’s inherently flawed.

  • 10. Affen92  |  January 21st, 2008 at 5:26 pm

    “when I set this up, create a user, login, search for friends and then click a friends name, it takes me to that friends page as if I’m logged in as him not me. So in turn any user can edit any profile. also it will never show the “add to friends” because anytime you go to someone else’s page you log in as them. Why is this happening? Your example doesnt do this and I’ve changed no code except for database connection.”

    I Have the same problem too…
    How do I fix this? :)

  • 11. why  |  June 19th, 2008 at 6:53 pm

    Field ‘presentation’ doesn’t have a default value

    why this measge apear when am trying resgetering

  • 12. Mathew  |  June 22nd, 2008 at 1:34 am

    Thanks for the awesome tutorial. I can probably pick some useful points out of this for my own project’s coding! :D

  • 13. jack  |  September 17th, 2008 at 1:48 am

    hi you’r tutroail get confouse in middle i get something and it work i try every thing help me.

Leave a Comment for Building your own Myspace.com with PHP Part I: Introduction

hidden

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Blog Posts

Categories

Posts by Month

Blogroll