ReactJS Simple Project with MySQL and PHP

ReactJS
Web Programming

ReactJS Simple Project with MySQL and PHP – Part 3

Steps: 1. Create a folder named react-php in htdocs folder to create PHP files to communicate with mysql database. 2. Create another folder api under react-php. 3. Go to api folder and create .htaccess file with the following code RewriteEngine On #RewriteBase /api/ Header add Access-Control-Allow-Origin “*” Header add Access-Control-Allow-Headers “origin, x-requested-with, content-type” Header add […]

Read More
ReactJS
Web Programming

ReactJS Simple Project with MySQL and PHP – Part 2

Steps: 1. Create Signup.js with the following code under Signup folder. import React, {Component} from ‘react’; import {PostData} from ‘../../services/PostData’; import {Redirect} from ‘react-router-dom’; class Signup extends Component { constructor(props){ super(props); this.state = { username: ”, password: ”, email: ”, name: ”, redirectToReferrer: false }; this.signup = this.signup.bind(this); this.onChange = this.onChange.bind(this); } signup() { if(this.state.username […]

Read More
ReactJS
Web Programming

ReactJS Simple Project with MySQL and PHP – Part 1

A very simple project of ReactJS is shown in this tutorial. Here, the authentication system is developed and feed entries are managed based on login user by using reactJS, mysql and PHP. Steps: 1. Create a database named reactdb and create two tables named feed and users by executing following SQL statements CREATE TABLE feed( feed_id int […]

Read More