12. Friend Lists and Social Website Notifications PHP MYSQL JavaScript Ajax Tutorial




Lesson Code: http://www.developphp.com/video/PHP/Friend-Lists-and-Social-Network-Notifications-Tutorial In this tutorial you can learn PHP, MySQL, …

source


44 responses to “12. Friend Lists and Social Website Notifications PHP MYSQL JavaScript Ajax Tutorial”

  1. Okay, so his website no longer has source files for the 2.0 version other than what is posted under each section video…but those sections are missing specifically (view_friends.php) and (list_users.php) so, all though following the tuts and learning the code as we progress through them are great, this issue leaves us beginners at a lost as to understanding how the entirety of the website functions and how the code is communicating to each others within the files?

    Anybody able to post the code for these files would be greatly appreciated and helping myself and others complete our website and education into php development!

  2. To everyone below asking for the script: I don't know, you do whatever you want to do, but ask yourself: do you want to be a copy and paster, or a programmer? Have you ever worked your ass off for something? You should try to learn these things…that's what the video is here for.

  3. so i have been wondering why this hasn't been working,  same with the temp password.  For some reason no data is saved in any of the tables except the users and friends.

    o,o i guess i have to back track.

  4. Hey Adam,

    At 23 minutes and 46 seconds in your video when you navigate to the Notifications.php page.  I noticed that your envelope icon was not flashing blue, but you had a new friend.  You may need to check to see if you are checking the new notifications or friends status when the page loads.

    Thanks for the good work!   All of the code I have gotten from you works fine, if I have not screwed it up myself. 🙂

  5. Thanks man you saved me from a lot of pain in the butt xD. Displaying the right friends for each user was kinda tricky but your code worked in my case too. And I have builded my website since now with out relying on web intersect scripts. So for these ppl who say your scripts do not work screw you all :).

  6. when receiving notifications on status posts and replies, everything works great. but after clicking on the notification, the notification stays in the list and the DB does not update as "did_read". therefore I can't clean the notification page of old messages. can you help with this? Thanks

  7. Hey Adam

    I love your videos.
    Can you pls upload or send me the view_friends.php I try it out to do it by myself but it didn't work. Can I have your script please?

    Thank you very much

  8. I seem to have the same problem, can't get response at the ajax script: I press the accept or reject and stops there. 

    How did you solve this problem ? I'm stuck for 5 hours looking at the code and testing everything but I can't find the error.

  9. I love this tutorial series Adam, Hope am not late, But i am having the prblems many have with the accept || reject function, it doesnt work with chrome but it works perfectly with Internet Explorer, any thoughts? anyone fixed this?

  10. Thanks Adam, it worked perfect. I really enjoyed this video, you are a showman! I just didn't understand why only showing "images/note_flash.png" when new notifications, and not when new friend requests as well. Like some others here, I was confused thinking something wasn't right. The explanation given by +TheAllyPost works perfect. Just in case somebody, like me, didn't understand it from the beggining:

    In Template_pageTop.php, change:

    $sql = "SELECT id FROM notifications WHERE username='$log_username' AND date_time > '$notescheck' LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows = mysqli_num_rows($query);
        if ($numrows == 0) {

    For:

    $sql = "SELECT id FROM notifications WHERE username='$log_username' AND date_time > '$notescheck' LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows = mysqli_num_rows($query);
    // New code added to show note_flash.jpg on new friend requests too.
    $sql = "SELECT * FROM friends WHERE user2 = '$log_username' AND accepted = '0' AND datemade > '$notescheck' LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows1= mysqli_num_rows($query);
        if ($numrows == 0 &&  $numrows1 == 0) {…..

  11. for everyone !  is the code is wrong at @ notification.php, find " file:///C|/Documents and Settings/123/My Documents/js/ajax.js"" and change it to ur file manager js/ajax.js " 

     Love Adam.

  12. Hello Adam Great Tuts Man, want to say, now that you explain the web programming and make it so easy, in this tut at the very last you talk about "Instant Text Chat Software" one of this days when you get time can you make a series in to show in DevelopPHP socket programming using PHP and MySQl for storing data tutorials. Thks.

  13. I have a problem when going to index.php : Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/31/7584731/html/SocialNetwork/root/index.php:8) in /home/content/31/7584731/html/SocialNetwork/root/php_includes/check_login_status.php on line 2 …. any suggestions? 🙂 

  14. i am having several problems. i cant seem to get both sqli and sql to work in my dreamweaver.  Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:wampwwwxxxxxxxxxxsocialphpsignup.php on line 19. And when ever i try to run the login.php it takes me to yourwebsite.com. how can i fix this.

  15. Great tutorial. Site is finished execpt for the fact that No friends show up on my profile and I have 3 other dummy accounts signed up and activated, yet Zero members to choose from.??

  16. To get notified when you get a friend request, you should add
    $sql = "SELECT * FROM friends WHERE user2 = '$log_username' AND accepted = '0' AND datemade > '$notescheck' LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows1= mysqli_num_rows($query);
    after
    $sql = "SELECT * FROM notifications WHERE username = '$log_username' AND date_time > '$notescheck' LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows = mysqli_num_rows($query);
    and if ($numrows == 0 && $numrows1 == 0)

  17. Great tutorials Adam – thanks. I have a problem I can't sort. The notification icon does not blink when there are new notifications or friend requests? Anyone had something similar and found out why? Adam's code works so it's obviously my error somewhere.

  18. Great Job Adam. You are an awesome teacher and better than most lecturer in University. Hahaha, this is my first youtube comment. Your works makes me wanna log in and make comment.

  19. hey adam can u help can u help me in creating edit profile form, i tried so much but so many errors occur please help me i have to submit my final project on social networking site please help

  20. thanks adam ive left the tutorial here as i don't need any profile photo and that but ive added an ajax chat system to chat in-between members and admins also an admin panel, thanks for the starter 🙂 and keep cool bro

  21. Hello Adam, thank you very much on this session. I know you already finished this tutorial session but i have to ask you for like tip or code to add in my system the follow button, i don't want them to friend and anything else i want them to follow each others, same like instant friends :D. So it would be great if you can post 1 more short video or just give me some code with that, because i am sure that other would like to see that too :). Anyway thank you again and i am expecting your replay

Leave a Reply