Question/Awnser Project...PHP/MYSQL
Moderator: General Moderators
Question/Awnser Project...PHP/MYSQL
Hello everyone,
I'm somewhat new to php and mysql but I can hold my own. I've been asked to a project for a friend, he's not paying me or anything but he thought it would be a fun thing to do and I was thinking about how to go about doing it...
Someone would ask a question and it'd be stored in a database. He'd then go to a page and see the questions, he would then proceed to choose the questions he'd like to awnser (that are in the database) he would then reply to them, and the ones he chose would be displayed on another page with the original question and his reply.
I guess that would kind of be like a forum, but he only chooses to reply to the ones he wants and only the ones he wants would be displayed. Can anyone kind of lead me into the right direction of doing this?
Thanks
I'm somewhat new to php and mysql but I can hold my own. I've been asked to a project for a friend, he's not paying me or anything but he thought it would be a fun thing to do and I was thinking about how to go about doing it...
Someone would ask a question and it'd be stored in a database. He'd then go to a page and see the questions, he would then proceed to choose the questions he'd like to awnser (that are in the database) he would then reply to them, and the ones he chose would be displayed on another page with the original question and his reply.
I guess that would kind of be like a forum, but he only chooses to reply to the ones he wants and only the ones he wants would be displayed. Can anyone kind of lead me into the right direction of doing this?
Thanks
Wise words,
I've made a way so that people can send in the data and then the data be viewed on a different page. What I need help is, how do I make it so that my friend can choose from that data what he wants to be displayed on the other page, and also a way for him to reply to a single question, also, how could I have it so that the quetions he choose get rightly matched with the right response, because from the php and mysql that page I speak of that shows the data simply shows all the data in the column, my friend must pick and choose what he wants to respond to... now that I think about it I think it would be of benefit to show my ideas for the pages...
ask.php (would be where the people would ask their questions)
process.php (a php script to tell the question to go to the database)
display.php ( a page where my friend could view the questions)
respond.php ( a page where my friend would choose the questions he likes and then type his reply)
process2.php (a php script to tell my friend's question to get in the database)
home.php (a page where the questions he chose are displayed and matched with their appropriate response)
Hope this all helps
I've made a way so that people can send in the data and then the data be viewed on a different page. What I need help is, how do I make it so that my friend can choose from that data what he wants to be displayed on the other page, and also a way for him to reply to a single question, also, how could I have it so that the quetions he choose get rightly matched with the right response, because from the php and mysql that page I speak of that shows the data simply shows all the data in the column, my friend must pick and choose what he wants to respond to... now that I think about it I think it would be of benefit to show my ideas for the pages...
ask.php (would be where the people would ask their questions)
process.php (a php script to tell the question to go to the database)
display.php ( a page where my friend could view the questions)
respond.php ( a page where my friend would choose the questions he likes and then type his reply)
process2.php (a php script to tell my friend's question to get in the database)
home.php (a page where the questions he chose are displayed and matched with their appropriate response)
Hope this all helps
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Okay. So for the time being, ignore the database element. Hard code into an array or something a couple questions. Each question will have a unique number associated with them. Use that to your advantage by passing that to the answering page using, say a checkbox.
Once you get the data passing to the answering page, redisplay the question and add a <textarea> afterward (or before, whatever you like.) Now get this page submitting to another pseudo database insertion page. Once you get that all working, you can add database hooking.
Once you get the data passing to the answering page, redisplay the question and add a <textarea> afterward (or before, whatever you like.) Now get this page submitting to another pseudo database insertion page. Once you get that all working, you can add database hooking.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
The database can auto-increment a number for you each time a question is added. There are other ways to do it but there's really no point in looking at them until you have some basics downanolan wrote:so your saying that the database will take care of the numbering and I just need to do some php to call upon using this numbering? Sounds good, so where should I start?