I have written a html code which is sending data to a c program. But stdin is unable to read that data in c program. It seems stdin doesnot have any data only.
Can anybody pls tell me what could be the reason??
Code is :
char *data = new char[MAX], *text = new char[MAX], *result = new char[MAX];
ofstream fp("/tmp/logg.txt", ios::app);
cout<<"characters are : ";
while((ch = fgetc(stdin)) != EOF)
text[i] = (char)ch;
text[i] = '\0';
if(data == NULL)
printf("Error! Error in passing data from form to script\n");