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 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:
- Introduction
- Designing the database
- Register and log in with sessions
- Presentation
- Friends and guestbook
Next part: Designing the database


Thanks!
I liked! =D
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.
“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 :/
“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…
Thanks for this code! It helped me and my friends in building our social network!
Peace
V.cool piece of code! Thanks.
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.
This Is Awesome thanks
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.
“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? :)
Field ‘presentation’ doesn’t have a default value
why this measge apear when am trying resgetering
Thanks for the awesome tutorial. I can probably pick some useful points out of this for my own project’s coding! :D
hi you’r tutroail get confouse in middle i get something and it work i try every thing help me.
[...] How to build your own online community with PHP [...]
[...] View Tutorial No Comment var addthis_pub=”izwan00″; BOOKMARK This entry was posted on Friday, June 5th, 2009 at 5:58 am and is filed under Php Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. [...]
the best tutorial ever!