lol

How To Make Posting or Status System Like Facebook in php

27 July 08:14am
(0)    297K
screen

How To Make Status System Like Facebook

Greetings our readers today I decided to make tutorial on status system like Facebook or posting system because when you learning PHP you need projects to make or learn about it, making posting, status system is very easy with PHP, PDO, OOP, and little bit JQUERY, and JAVASCRIPT. Best practices for beginner lets starts


First create database and name it posting-system
CODE
http://www.onet4u.com

CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(60) NOT NULL,
  `password` varchar(255) NOT NULL,
  `first_name` varchar(40) NOT NULL,
  `last_name` varchar(55) NOT NULL,
  `profile_image` varchar(255) NOT NULL,
   PRIMARY KEY (`user_id`)
); 
CREATE TABLE IF NOT EXISTS `posts` (
  `post_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id_p` int(11) NOT NULL,
  `status` text NOT NULL,
  `status_image` varchar(255) NOT NULL,
  `status_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`post_id`)
);

http://www.onet4u.com


CODE
http://www.onet4u.com

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

http://www.onet4u.com


db.php
CODE
<?php
 
try {
    
$pdo = new PDO('mysql:host=localhost;dbname=posting-system''root''');
     
} catch (
PDOException $e) {
    print 
"Connetion Error!: " $e->getMessage() . "<br/>";
    die();
}
?>


main.php
CODE
<?php 
 session_start
();
 include 
'class/functions.php';
 include 
'db.php';
?>

And make class folder in core folder and make clsss.php in core folder class.php will hanlde our functions

Complet php
pliss download zip file..


screen
Sharing is Caring
digg  
digg    googel   facebook    twitter    delicious
Comments
Categories Uncategorized 10 Android Apps 151 Windows Tools 20 PHP & HTML Script 17 Tutorials 25 Novel 1 Music Maker 4 Mac OS X 6 Data Recovery 7 Games 62 3D/Animation 11 Web-Design 7 Antivirus/Security 5 Android ROMs 5 The Viral Story 6 Whmcs Free/Nulled 1