I want two webpages in my website in such a way that:
Users can input their data into some textfill/textarea (html form) in webpage-1.
Their data is shown in webpage-2.
**webpage-1:(user page)**
post :
name:....
age:....
roll:...
description:......
**webpage-2:(admin page)**
post no:1
name:....
age:....
roll:...
description:..........
post no:2
name:....
age:....
roll:...
description:..........
post no:3
name:...
age:....
roll:...
description:..........
The basic architecture of your website should be something like this. Design both pages and share the data using local storage.
Follow these steps:
setItem() method of localStorage web api to store posts in an array.var posts = [];
localStorage.setItem("posts", JSON.stringify(posts));
getItem() method.var storedPosts = JSON.parse(localStorage.getItem("posts"));
The data is stored in browser's permanent memory. This way you won't lose your posts data while moving from User page to Admin page.
Read this article for a detailed explanation of localStorage along with examples and projects.