I am trying to write a program that will recieve a non-determined number of fields from an HTML form and return their values back to the browser in an interesting way. I am stuck on some of my code because I want to create 1)spaces between the questions 2) add a box where the user can type in an answer. Here is code I have so far:

#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    
    cout << "Content-type:text/html\n\n <br>";
    cout << "<html> <br>" << endl;
    cout << "<head> <br>" << endl;
    cout << "<body> <br>" << endl;
    cout << "<body bgcolor=\"red\"> <br>" << endl;
    cout << "<font color=\"white\"> <br>" << endl;
    cout << "<center><b><font size=\"+4\"><blink>My Christmas Wish List</blink></font></b></center>\n <br>";
    cout << "\n<font size=\"+2\">The one thing I want most for Christmas is:</font> \n <br>";
    cout << "\n<font size=\"+2\">The reason I think I deserve to get this is:</font> \n <br>"; 
    cout << "<font size=\"+2\">1: I have been a very good boy/girl all year.</font> \n <br>";
    cout << "<font size=\"+2\">2: I have been a very good boy/girl most of the year.</font> \n <br>";
    cout << "<font size=\"+2\">3: I have been a very good boy/girl for the month of December.</font> \n <br>";
    cout << "<font size=\"+2\">4: I was a very good boy/girl yesterday.</font> \n <br>";
    cout << "<font size=\"+2\">If I was on a good boy/girl list my name would be shown as:</font> \n <br>";

>>I want to create 1)spaces between the questions

Not sure what you mean by this. If you want the questions to be like double spaced lines that you type for english class papers then just call endl twice in a row like this: cout << endl << endl; If you mean something else please be more specific what you want.

>>2) add a box where the user can type in an answer

This requires a graphical user interface. Some of the languages that allow you to do that are C, C++ and Visual Basic. The learning curve for VB is reportedly shorter than with C/C++. Once you get there though, most people say you'll have more control over your options using C or C++ than you'll have with Visual Basic. The choice is yours, though C and C++ are the topics on this Board.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.