Hi, all -- I am working up a CGI script to take advantage of Apache's suEXEC so that the web server can manipulate files as the site owner. I have already managed a simple
$f = fopen("/path/to/docroot/testfile",'w') ;
fwrite($f,"hi!\n") ;
fclose($f) ;
and know that it works as intended, but now I seem completely unable to
get any $_POST (or even $_GET) data into the script. I suspect, from
reading the manual and noting the warnings, that any GET data will be
ignored, and that's fine, but I know that I can provide that without even
messing about with a form that I might somehow be screwing up, so I
thought I'd try it...
My code is as simple as
#!/usr/local/bin/php
<?php
print "Content-type: text/html\n\n" ;
print "_POST IS ." ; print_r($_POST) ; print ".<br>\n" ;
print "_GET IS ." ; print_r($_GET) ; print ".<br>\n" ;
print "Enter your password:<br>\n" ;
print "<form method='post'>\n" ;
print "<input type='password' name='pass'>\n" ;
print "<br>\n<input type='submit' value='ENTER'>\n" ;
print "</form>\n" ;
exit ;
?>
but I only get
_POST IS .Array ( ) .
_GET IS .Array ( ) .
Enter your password:
____________________
ENTER
even after submitting. Switching to
<form method='get'>
doesn't help anything.
So how on earth does one get data into a CGI PHP script?
TIA & HAND
:-D
--
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgpi7TjlJ0mJ7.pgp
Description: PGP signature

