Interactive ebooks?

I've been thinking of doing an ebook that was like a workbook...giving the reader written exercises to do.
If I do this most likely they'll just have to use their own notebook to do the exercises.

But I started thinking maybe I could use an ebook compiler that uses an interface like an internet browser. And then create it so inside the ebook was perhaps something like a message forum or guestbook? So they could read the exercise, and then simply write and post the response. And it would simply be added to their ebook. ???

If my explanation makes sense do you think it would work? I think I would have to use cgi scripts or something to do this, and I know nothing about cgi.