Reply to Re: PHP MYSQL Script

Your name:

Reply:


Posted by Schraalhans Keukenmeester on 09/26/05 14:18

w.bristow@rchl.org.uk wrote:
> Does anyone know how to achieve the following. I am trying to create a
> self-help service on a test site, what I want to do is abit like the
> troubleshooting you get on say your operating system, so you perhaps
> would see a set of radio buttons, against each will be a question, for
> example "Do you have a problem with your printer?"; "Do you have
> problem with your PC?". When you choose one of these and click next you
> get the same radio buttons, however the statements next to them will
> now relate to the question chosen in the previous one, and so on.
>
> Example:
>
> o Is problem with Printer?
> o Is problem with PC?
>
> SUBMIT>
>
> (You then see on screen after clicking Submit, if you choose Printer
> option)
>
> o Do you see any lights on your Printer?
> o Is there any messages on a screen?
> o Is there paper jammed?
>
> And this goes on til a solution is done.
>
> Each questions I was anting to put in a MYSQL database so it was easier
> to alter, rather than having a large variable list.
>
> If anyone knows how I can even start this would be good
>
> Thanx
>
Assuming you know how to create a MySQL db and the proper lines to query
it from within PHP I'd go for a db setup like this:

Fields:
- MsgID Holds the unique message number
- Message The actual message string.
- OptYes A string with the numbers of the next messages to display e.g
"2,6,7"
- OptNo A string with the numbers of the next messages to display e.g
"9,11,21,27"

Of course you have to make sure people can't run in circles and always
end up somewhere definitive. If your desing is good loops should not
occur, if you want a safety valve you could include a field
"HasBeenUsed" with a TRUE or FALSE option.

If you want the system to adapt itself (more advanced) you could tally
the number of times a certain option was chosen and in the future list
those first. Keep score in another field of course.

I am sure there are a zillion ways to do this, and better at that. But
here's one!

Success
SH.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация