How To Make Posting or Status System Like Facebook in php

Author

I am Aizaz.Dinho and I loved to learn new things and teach to people like you, In my mind I'm the one who can do anything whatever I want, From my heart am still learner and loved to do impossible things, Web Development is my passion and I have PHP, MYSQL OOP PDO, Blogger WordPress also SEO experiences, You can say I'm the code ninja of meralesson

52 comments:

  1. can you give the DAtabase of this? thanks

    ReplyDelete
    Replies
    1. Here you go https://drive.google.com/file/d/0B4q4IW6m2bK9amxKelZQX0U0djQ/view?usp=sharing and replace posting-system with posting_system in connection.php

      Delete
  2. Hi in this tutorial how to set user to post author

    ReplyDelete
  3. good tutorial i will try it tnx for giving also login :D

    ReplyDelete
  4. posts of all the users are shown in a single profile

    ReplyDelete
  5. Hello for some not-known reason on my page was showed this under the post box and on the top of the post:
    < script type="text/javascript"> //Image Preview Function $("#uploadTrigger").click(function(){ $("#uploadFile").click(); }); function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#body-bottom').show(); $('#preview').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } < /script>
    From where can i remove or fix this, all work perfect wihout his running. Link: http://thejockersbase.pe.hu

    ReplyDelete
  6. i just updated the index.php file, You just need to copy and replace with yours.

    ReplyDelete
  7. Hi Alzaz, Please help me. The password test does not work.

    I created this entry in the table aizaz.dinho as user and 098f6bcd4621d373cade4e832627b4f6 as password.

    Thanks you...chris

    ReplyDelete
    Replies
    1. looking at the core/class/function.php file and the variable being carried over for both user and password shows ?. is this correct.

      Delete
    2. Hello Chris maybe you misplace the code, try to download fresh copy of codes and also download the database from here https://drive.google.com/file/d/0B4q4IW6m2bK9amxKelZQX0U0djQ/ and replace posting-system with posting_system in connection.php

      Delete
  8. How can i change the password (and how the new password can be encoded just like you did with 'test' ) ?

    ReplyDelete
    Replies
    1. Go to the database (phpmyadmin) and edit the users table and on the password field choose MD5 encryption that's it

      Delete
  9. hey, the code is not downloading, please do provide the source from where i can download it.

    ReplyDelete
    Replies
    1. the downloading link is working fine, Here's another link for you https://www.dropbox.com/s/qh476474luoc59d/fb-posting-system.rar?dl=0

      Delete
  10. hi . i just want to ask if the time will update ? i tried it in localhost but the "time ago" is not updating . please help

    ReplyDelete
    Replies
    1. in the database status_time is set ON UPDATE CURRENT_TIMESTAMP, so whenever you update your post it will update the time. make sure you didn't change anything in the class.php add_post prepare query

      Delete
  11. than you for this. can I have also the code for adding a comment.

    ReplyDelete
  12. Hi,
    thank you for the code.
    But can you please help me as when I copied it to my files and folders I received this message in the browser:
    Fatal error: Call to a member function prepare() on null in C:\wamp64\www\pt1\class\functions.php on line 48.
    And line 48 is like it is on your file $query = $pdo->prepare('SELECT * FROM users WHERE user_id = ?');
    Thank you!

    ReplyDelete
  13. Sir where should I insert this?
    "INSERT INTO `users` (`user_id`, `username`, `password`, `first_name`, `last_name`, `profile_image`) VALUES
    (1, 'aizaz.dinho', '098f6bcd4621d373cade4e832627b4f6', 'aizaz', 'dinho', 'images/profile.jpg');" ?

    your username is aizaz.dinho and password is test

    ReplyDelete
    Replies
    1. in users table, (click on SQL tab in users table then execute the code)

      Delete
  14. good comments!

    ReplyDelete
  15. Hi, Great tutorial. Any info for the commenting part? Cheers!

    ReplyDelete
  16. Really helped me alot and made my work easy . Thank you very much. i'm developing Tuting system in .net if anyone wants to contribute in my work ... contact me on sarmad.fici@gmail.com

    ReplyDelete
  17. any example for comment section ?

    ReplyDelete
  18. how to set plain text password for new users

    ReplyDelete
  19. hello!time is not showing its just showing just now on every post.bt in database the time is updated

    ReplyDelete
  20. problem solved!!use date_default_timezone_set('Asia/Kolkata') inside the time function.since i live in india i used this for other countries there is different id so they can use that.

    ReplyDelete
  21. hello sir, nice work with the source code.
    but i need you to help me with the time of each post. any time i upload any post, i do get "60 minutes ago" which is a wrong timing and any time i refresh the page, it jumps to "1 hour ago"
    !!please help!!

    ReplyDelete
  22. hello sir, nice work with the source code.
    but i need you to help me with the time of each post. any time i upload any post, i do get "60 minutes ago" which is a wrong timing and any time i refresh the page, it jumps to "1 hour ago"
    !!please help!!

    ReplyDelete
  23. the posting system is work ! thanks for that ....so how about the like ,comment, and share .still not working ...how can i download the latest code????

    ReplyDelete
  24. Hello.. Amazing post it really worked without no problem.. Can you make the like and comment button work.. Would really appreciate that and also a code where the users can message their selfs within the site

    ReplyDelete
    Replies
    1. we will update this posting system to new posting system like facebook with like and comments features

      Delete
  25. Hi, do i enter my login details when i code the function here ? class Main{
    //login function
    public function login($username,$password){
    global $pdo;
    $query = $pdo->prepare("SELECT * from users WHERE username = ? and password = ?");

    or i just leave it as it is. coz nothing happens when i punch in my login details. and i have done all the steps shown on the tutorial

    ReplyDelete
    Replies
    1. Leave it as it is, make sure you added the users in the users table and add the database name into your connection.php which will be in core folder. and also try to download the code again.

      Delete
    2. ok thanks brother. it is working now but the only two things i dont get is when i click on login it pops up this

      "Warning: Cannot modify header information - headers already sent by (output started at /home/movingso/public_html/index.php:60) in /home/movingso/public_html/core/class/functions.php on line 14

      then i have to refresh the page again so that it passes that error.

      and again it is not allowing me to login with any other password unless i use "test" even on other users i have created

      Delete
  26. facing this problem..."Fatal error: Class 'main' not found in C:\xampp\htdocs\posting-system\index.php on line 4 ...what can i do now?

    ReplyDelete
  27. Hi Aizaz

    So desperate to get the like and comment codes. when is it going to be available? you have help alot by taking us this far but now we are all stuck

    ReplyDelete
  28. i want to enable the comment section..how can i do it?

    ReplyDelete
    Replies
    1. we will update this posting system to new posting system like facebook with like and comments features

      Delete
  29. hi , i already have a forum system that support comments , messages , so can i link this posting system with it ?

    ReplyDelete
    Replies
    1. hey, can you please share the source codes for the comment system

      Delete
    2. we will update this posting system to new posting system like facebook with like and comments features

      Delete
  30. and i already have an existing database and login system and it is work well

    ReplyDelete
  31. please update this posting system to new posting system like facebook with like and comments features

    ReplyDelete
  32. hello aizaz i need to talk to you about this code and need some help

    ReplyDelete
  33. Hi, can i kindly get user registration code for this system. Thanks

    ReplyDelete
  34. i need the update for Like and Comment features. Thanks

    ReplyDelete
  35. thank you very much it works :)

    ReplyDelete