Jump to content

Recommended Posts

You could do either, change the page based on the answers or redirect based on answers, it depends if you want a single cluttered file or a nicely set out 2+ files. It just depends on the ratio of cluttered file:more files you want, I recommend for what you want 2 pages of php would be good

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Please go for some online tutorials before asking on forums.

There's no free meal given in this world!

 

After you gained your basic knowledge in HTML, PHP.

I believe you will get your idea well-developed

Link to comment
Share on other sites

The majority of us are here because we have an interest in web site design and development. I would agree that XPlumped... should do a little leg work before asking, but it could be that they have no idea of how to even get started. Most of us are here because we have an interest in web design and/or development. Discussing something like html forms may reveal a new technique or some functionality not everyone knew. The one thing I would caution though is when someone asks what looks like a homework question. I don't think this is the case here, but you will never learn how to code if someone does it for you. Experience is the best teacher. Okay, off my soapbox and back to the original question.

 

This is just a stab at the logic behind the scenes. If I wanted to direct someone to a page based on what was selected I would use either threshold values or a simple count with the winner taking the prize. By assigning numeric values to each multiple choice letter you could set up a compound if to decide which page should follow. For example, if you assign A=1, B=2, C=3, D=4 you could loop through the answers and tally up the selections to get a value. That value would then be compared to threshold values in a compound if statement to send them onto the desired page. In a 10 question survey, a score of 10-19 might send you to the "A" page. In the counting method the majority wins, but you do have to figure out what to do in ties. The threshold method doesn't have that drawback.

 

This was just a quick stab at an answer and there are plenty of other ways to do it. I'd probably go javascript, but others might be more comfortable with php or VB in an asp or asp.NET application.

Link to comment
Share on other sites

  • 3 weeks later...

I think PHP is easier to learn. Together with MySQL, it would be easy.

Submit query, retrieve data from database and echo it. That's all.

But if you have some basic in javascript. It saves time on scripting though.

Both with pros and cons.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...