Help with multiple choice/final result
Hello there guys... I really need help, and im gonna try to explain exactly:
Good friend of mine asked me to create web app that will give result based on your choices during the survey. Example:
I wanna create new aquarium, so based on the fish that i wanna keep in it, final result gives me compatible fish with those,plants,food that's best for them etc.
Is there any template for that? I really dont wanna write it from scratch, and main problem is that i dunno how to search that kind of programes... lol
Tnx in advance...
P.S. Sorry for my bad English...
Your English is perfectly fine, no problem there
As for your question, you could consider using a database, especially if there will be a lot of information to be presented for each result. For example, in a MySQL database (free), you would have 1 column dedicated to the name of the fish and this column would be unique (i.e. your primary key). The other columns would be for plants, food and whatever else. Since each row would be dedicated to a particular fish, you would retrieve that particular row based on the user's selection.
If there will be multiple questions, then you need to figure out how to calculate the final result. It can be done through a series of if-else statements but that logic is something you need to work out, unless you provide an example of the logic and the choices.
The HTML portion is rather simple and can be written from scratch, same with the PHP and database portion. You could check out CodeIgniter as a PHP library resource to help you out. There are tons of examples, temples and libraries out there for the HTML and CSS portion, choosing the one you want somewhat comes down to how you want it to display.
Thanks so much! Beers on me!
I do not know if there is anything good out there, but you could try searching on "PHP expert system" to see if anything useful comes up. (Many so-called expert systems do pretty much what you state: ask a question, and depending on the answer, ask another question, and so on until it gets to the end of a decision tree.)
"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
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
NoDog, i dont need to ask another question, only like Im gonna choose 'Goldfish' and as a result programme will give me 'Tank at least 10 galons, that plant, and goldfish flakes for food' . U know what i mean? Just need someone to link me good template for database with i dunno 8-10 rows with id's and some simple graphics...
All parameters that i need are compatibility with other fish, size of aquarium, base of sand, food and dificulty of keeping. How complicated is to make that?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)