Salve io ho realizzato un semplicissimo form del tipovorrei sapere come posso realizzare una cgi che mi stampi a video i valori di alfa e beta derivati dalla decodifica dell url io ho provato a usare anche la bash..codice:<HTML> <BODY> <FORM action="/cgi-bin/maurizio.cgi" METHOD="POST"> <input type=text name=alfa> <input type=text name=beta> <input type=submit name=bottone value="INVIA"> </FORM> </BODY> </HTML>ma mi da un problema del tipo "malformed haeder script"codice:#!/bin/bash function getkey() { echo "$query" | tr '&' '\n' | grep "^$1=" | head -1 | sed "s/.*=//" | ./urldecode } if [ "$REQUEST_METHOD" = POST ]; then query=$( head --bytes="$CONTENT_LENGHT") else query="$QUERY_STRING" fi echo "Content-Type: text/html" echo "Query=$query" alfa=$( getkey alfa) beta=$( getkey beta) echo "Alfa=$alfa" echo "Beta=$beta"
grazie mille...

Rispondi quotando