Habe dies jetz geändert das resultat bleibt leider gleich
Code:
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
#include "include/libhtml++.h"
using namespace std;
std::string htmlformselect::anfrage(std::string methodform )
{
char* buffer = 0;
unsigned int len;
if (methodform == "GET")
{
len = strlen(getenv("QUERY_STRING"));
buffer = new char[len+1];
strcpy(buffer,getenv("QUERY_STRING"));
}
else if (methodform =="POST")
{
len = atoi(getenv("CONTENT_LENGTH"));
buffer = new char[len+1];
for(unsigned int i=0; i<len; i++)
cin.get(buffer[i]);
}
buffer[len] = 0;
formselectoutput = buffer;
delete[] buffer;
return formselectoutput;
}
Vielleicht liegt es ja an dieser funktion:
Code:
#include <iostream>
#include <string>
#include <fstream>
#include <stdio.h>
#include <cstdlib>
#include "include/libhtml++.h"
using namespace std;
void htmlformselect::formselectdisplay (std::string formselectname, std::string formselectinput, std::string methodform)
{
formselectinputprint = formselectinput;
int pos = 0;
do
{
pos = formselectinputprint.find("[F]");
if(pos != string::npos)
formselectinputprint.replace(pos,strlen("[F]"),"<option>");
}
while(pos != string::npos);
do
{
pos = formselectinputprint.find("[/F]");
if(pos != string::npos)
formselectinputprint.replace(pos,strlen("[/F]"),"</option>");
}
while(pos != string::npos);
cout << "<select name=" << '"' << formselectname << '"' << formselectinputprint << "method=" << '"' << methodform << '"' << "action=" << '"' << "http://tuxist.de/cgi-bin/index.cgi" << '"' << ">" << endl;
}
link zur kompletten Anwendung:
ftp://tuxist.de/tuxist/tuxcms
Lesezeichen