Quiz algorithm by steps logic [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hello Stackoverflow Family, I'm trying to create a small quiz application for my website. I've created true/false and points questionnaire but the one I'm stuck with is something like this.
What is the logic of these types of quizzes?
I use php and jquery.

Basically start with a question, say:
do you have four legs?
If they answer yes, you've got an end point, dog. ask:
are you a dog?
If the answer is no. ask for a question which shows the difference between a dog and their answer, also what their answer is. so next time someone isn't a dog, ask them that question.
What are you?
a cat
Suggest a question to separate a cat from a dog?
"do you go miow?"
basically build up a tree of data, each question points to either a question on the 'yes' or 'no' action. or an end point, which is either "are you this?" or "so what are you?"
in theory, and it's not perfect, but it's pretty good, this will guide a user to the answer they're seeking if it's been put in before.
that's the logic, but I don't use PHP, so you'll have to work out how to implement it yourself.

Related

I want to make an online recruitment website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I want to make an online recruitment system(web) for my project in school. What are the language I need to learn except PHP. Thanks for the answer guys.
Not very proper question, you might find the answer by googling.
Anyway, You might need so far:
HTML: It will be like the skeleton of your page.
CSS: Basic knowledge would be a plus for understanding how to make it pretty.
MySQL: Unless you want a static page, you would need DB in order to save the data itself. Useful for manage cookies, sessions, users, etc.
My advice - Download some HTML free template and use it as base. Integrate it with PHP for DB connection and usage.

PHP + MySQL Best practice [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
So I'm having some trouble explaining to my buddy why a specific piece of code is "bad practice", does anyone know where I can find some information on why it's a bad way to do it? (Or maybe it's just me who think it's bad).
Here's what he wants to accomplish:
Create a "dynamic form input", so he will create a table with different types of cols. And then in the file that shows the form he will just make alot of different "if type == varchar" etc. and then display a form after that
When saving a form he will loop thru all the $_POST data and insert it into a table depending on the key's etc.
He want's to make everything dynamic and I can see why that could be cool, but in my book this seems to be very bad practice, so is there a better way to do this or is there some articles I can show him about why this is bad etc.?
Everything is for a private admin panel, but still I feel there is a lot of issues.

Is it easy to create a answer generator in php [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create a question and answer generator based on countries for example, if I put the question, what is the capital of England? I want it to automatically generate the answer London. Is it easy to do this in PHP or any other language?
I wouldn't say "easy" but it's do-able, and very time consuming. It's not something you could whip up in a matter of hours.
You have to account for mis-spelling, question format etc. and just pull answers from a database based on what you get. But it depends on how far you want it to go.
To make it intelligently generate the answers, that's another story, as IMSoP said, but you could take "What is the capital of England?" with a form, look for "capital" and "england" and then look in the database for what to return when that is asked, and output it that way. If it's just a few basic questions about countries then yeah, that's easy, and it will take a few hours to write, but a proper Q&A application is not something that is easy, or quick.

How useful could be an html generator class? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm working on my first opensource project, and I found useful do do an html generator class, treating the html elements as php objects, but now I don't know if it really makes sense in the real world.
Have you ever needed an html generator class for you projects?
If your answer is yes, what would you find useful on it?
If someone wants to help in the project, you are welcome to the repository on github.Github repo
Thank you.
This approach, although liked by many at first sight, always fails a reality check.
Please learn about templates - the only way to go in dealing with HTML from PHP applications.
You need them only if you are some outsourced worker from India or China. Otherwise do not use them since you have potential to ruin your career and credibility.
Those tools are built for doing very dirty code without any future prospects.

How do you deal with other people’s messy, substandard code on a new job? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
This is a general coding question so please feel free to answer any way that is applicable to you.
When I work on new development for clients that I freelance for I write frameworks, write all the front and backend code and everything is just great.
On numerous occasions, I’ve been brought in as a contractor and sat down on day one to try and do what I’ve been asked and been frustrated, terrified and mystified at past work others have done before me. The boss always expects fast results but I feel like I need a week or two just to really get up to speed on everything going on with these complex and slopily written "frameworks" that have been done before me. Is this normal? If so, how do you PHP developers deal with this challenge?
Buddy,
I am currently in the same situation. Just to avoid being all 'Zen' - we have a job to do - lets get it done and move on to the next job.
Aim to meet your goals - get the new functionality working and just let the employer know the code stinks and that you would recommend he gets that sorted out asap. Raise the red flag and let it go. You know that you have done your job.

Categories