Wiem że do tego powinno się używać PHP albo .asp , ale ja niestety jestem totalnie zielony jeśli chodzi o te technologie. Za to trochę znam te słynne C-like więc napisałem program:
// getting_command_outside.cpp : main project file.
#include "stdafx.h"
#include <fstream>
using namespace std;
int main(int argc, char *args[])
{
ofstream ofile;
ofile.open("database.txt");
for(int i=0; i<argc; i++)
ofile<<args[i];
ofile.close();
return 0;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>Complete an form</title>
<style type="text/css">
#Text1 {
width: 144px;
}
</style>
</head>
<body>
<form action="getting_command_outside.exe" method="get">
<input id="Text1" type="text" />
</form>
</body>
</html>
Wystarczy zmienić pole 'action=' , czy może trzeba całkowicie zmienić podejście?