I am a fresh frontend web programmer. and I recently programmed few types of web based mobile applications(means originally developed on web using angularJS and I have used a tool to create .apk file) basically for myself .these apps are including " Creating Shopping List" , "Price Comparison" , "Things To Do" and "Motor Pump Alignment Readings Calculator" . But these apps are limited to myself .But I want that any other user should be able to use it.Problem is that My webhosting plan allow only 5 databases .So I can not create a new database for every new user. So please help me and suggest me that how every users data can be stored seperately .
An Example: When i have to create a new shopping list, then it should be in a new table. For just myself , it is not a problem but suppose there are 200 users (e.g. my friends and family member) , then how i will manage it...?
Here is a very short and simple code for concept clearing that how a new shopping list is create.
ِHTML: <input type="text" ng-model="newItem" /><button ng-click="add()">Add</button> JS:
var app = angular.module("app",[]); app.controller("myCtrl",function($scope,$http) { $http.post( "inser.php", {'listItem':$scope.newItem} ).then(function(response) { $scope.showdata = response.data; }) }); PHP:
$connect = new mysqli("host","user","pass","db"); $data = json_decode(file_get_contents("php://input")); $list_item = $data->listItem; $insert = $connect->query("insert into TableName (coloumn) values ('$value')"); In this case , a database and a table is already assigned to query. and it is easy but for dynamic user experience , I am unable to get any idea.