I have a CGI based form that I am working with and I would like to be able to include some PHP code in the generated results. However, when I do this, the PHP does not appear to get processed and just ends up being displayed in the resulting web page.
Is what I am doing actually possible or am I missing something?
Thanks.
No, that’s not possible. You could however, in a PHP script,
include('http://url.to/cgi/script');and then point your browser at the PHP script rather than the CGI script. This will cause PHP to open a new connection to the server, execute the CGI script, and then parse it’s output as if it were a PHP script.EDIT2: Here’s how you could do it with postdata including file uploads:
Please note that’s untested…