I was working on a project similar to that on Code Pad . I have a php form that calls the c compiler on the linux server. The compiler compiles and executes and sends the output to a file that a php script reads and displays.
I have challenges with rendering Input operations that way.
I tried scanning the source code file for any input function then ask the user to enter values for each corresponding variable in the input function, then i stored the users value in a text file which i then pass to the c program as stdin.
It worked for basic programs - but in cases where there are conditional statements, that wouldn't work.
I was thinking if it would be possible to have a terminal on the webpage that users can access and execute thier programs on.
Or would there be any other way i can effectively handle this?