hpjchobbes Posted August 14, 2007 Share Posted August 14, 2007 I have a problem that I *think* can be solved by PHP. Since I don't know PHP yet, I decided I should ask people who know to see if it would be possible before diving in and learning it. I want to create a questioning webpage. I have an XML file that looks like this: <ARTICLE ID="10a3Fc"> <QUESTION ID="1" TITLE="Question would go here?"> <ANSWER REF="2">First answer - Links to Question ID 2</ANSWER> <ANSWER REF="3">Second answer - Links to Question ID 3</ANSWER> </QUESTION> <QUESTION ID="2" TITLE="This is question 2!!"> <ANSWER REF="1">Go back to the first question<ANSWER> </QUESTION> <QUESTION ID="3" TITLE="Our third and final question"> <ANSWER REF="2">Go to Question 2!</ANSWER> </QUESTION> </ARTICLE> What I would like to do is have the web page display the only the first question and it's answers. When the user chooses one of the answers, I would like it then to show the next question based on the REF of the answer. So in the first question, if they click the second answer of the first question, it would display the "Our third and final question" and the related answers. Is this possible to do with PHP and is it what PHP was designed to do, or am I looking in the wrong direction? Thank you for your time! Quote Link to comment https://forums.phpfreaks.com/topic/64869-solved-would-php-work-for-this-problem/ Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 Yes you can do this in PHP. No PHP was not designed for writing surveys from an XML file but that doesn't mean it's not well suited to do it. Quote Link to comment https://forums.phpfreaks.com/topic/64869-solved-would-php-work-for-this-problem/#findComment-323667 Share on other sites More sharing options...
hpjchobbes Posted August 14, 2007 Author Share Posted August 14, 2007 Thanks for the response. Now it's time to start learning PHP!! Quote Link to comment https://forums.phpfreaks.com/topic/64869-solved-would-php-work-for-this-problem/#findComment-323714 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.