MAIN     ARCHIVES

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

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 [...]


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

13 Responses to “Building your own Myspace.com with PHP Part I: Introduction”

  1. Dark Wolf says:

    Thanks!
    I liked! =D

  2. ryan says:

    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 says:

    “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 says:

    “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 says:

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

    Peace

  6. Nizzo` says:

    V.cool piece of code! Thanks.

  7. Concerned says:

    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 says:

    This Is Awesome thanks

  9. Adam says:

    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 says:

    “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 says:

    Field ‘presentation’ doesn’t have a default value

    why this measge apear when am trying resgetering

  12. Mathew says:

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

  13. jack says:

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

Leave a Reply