2

index.sh is in the cgi-bin directory:

#!/usr/bin/ksh

echo 'Content-type: text/html

<html><body>
<form action=FOO.KSH method=POST>
<input type=submit value=fgrep style=width:42px>
<input type=text name=name type=text autofocus size=60>
</input></form>
<br>'

FOO.KSH

#!/usr/bin/ksh

printf "Content-type: text/html\n\n"; 

echo $1
echo $QUERY_STRING
echo $(</dev/stdin)

Q: Why does the FOO.KSH gives an empty file if I send an "a" string in the index.sh's form?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
gasko peter
  • 5,434
  • 22
  • 83
  • 145

1 Answers1

0
method=POST>

needed to be

method=GET>
gasko peter
  • 5,434
  • 22
  • 83
  • 145