Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Twitter Clone using PHP

NotificationsYou must be signed in to change notification settings

iSimar/Twitter-Like-System-PHP

Repository files navigation

A simple twitter clone using PHP and a MySQL database.

Try out theDemo for Twitter-Like-System-PHP

Setup

  1. Create a new database in MySQL - recommended
  2. Run the following SQL code to create the tables in the database
CREATE TABLE users(    id int NOT NULL AUTO_INCREMENT,    username varchar(15) NOT NULL,    password varchar(32) NOT NULL,    followers int DEFAULT 0,    following int DEFAULT 0,    tweets int DEFAULT 0,    PRIMARY KEY (id));CREATE TABLE following(    id int NOT NULL AUTO_INCREMENT,    user1_id int REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,    user2_id int REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,    PRIMARY KEY (id));CREATE TABLE tweets(    id int NOT NULL AUTO_INCREMENT,    username varchar(15) NOT NULL,    user_id int REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,    tweet varchar(140) NOT NULL,    timestamp bigint(20) NOT NULL,    PRIMARY KEY (id));
  1. Openconnect.php and edit the database information. The following three setting variables are required in order to establish a connection with the database.
$dbuser= "USERNAME"; //Username that is allowed to access the database$dbpass= "PASSWORD"; //Password$dbname= "NAME-OF-THE-DATABASE"; //Name of the database

About

Twitter Clone using PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp