How to build site that takes info and relays it back with proper inputs
I am trying to find out the best way to do the following.
The website with have some content and then an input field. The information the visitor inputs into the field will then be used throughout the following pages/questions.
I have done part of it using just php, but it creates a ton of pages, and having a hard time finding a way to use the information given from one page to be used through the whole series of questions and pages. Not just the one after.
Am I not sure if the best way would be to have the information all go into a databases, and then call for the information when needed. And have a separate page for each question
Or if it is possible to have a single page that has a questions, when it is answered, the input is relayed back on the same page, with additional content or questions, and that is repeated multiple times.
I am not stuck on one way or the other, just wondering what is possible, and what the best way to go about it would be.
Thanks a ton
If you only need the data to persist during the current session of usage by a given user, then PHP sessions are a viable answer.
If the user-supplied data needs to hang around for an extended time (i.e. across multiple sessions), then you probably need to add database usage along with some sort of user login system.
As far as the overall application design, that is more difficult to answer without more info, though based on what we know so far, I'd probably start with the idea of a single page with code to dynamically control what gets displayed through some combination of logic, data, and include files (which sort of points to a MVC approach).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
thank you for your answer!
Yes it will be just the current session so using php sessions that is great, thanks.
I have never used an MVC approach before, I quickly looked it up, and is there a language that works best when using this approach?
I am more familiar with php, but I saw multiple pages using asp.net with C# .
Again I am new (obviously) so my apologies if that is a silly question.
To give you more info about what I am doing. It is basically a story. A story in which it will basically have a conversation with the user. So there will be questions asked, which I will need to use the answers throughout this story (session).
I do like the idea of using MVC to control the output on pages. As I will use multiple pages if there is a different design etc needed, but for the most part, it will be like a conversation, which I don't need them to go to a whole new page for.
Hopefully that gives you more insight, basically a conversation of the computer and the user.
If you can provide anymore suggestions, that is great, if not I appreciate your help
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread