For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > October 2005 > weird script!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author weird script!
Adriano Allora

2005-10-12, 6:55 pm

hi to all,

I want to write a very stupid script. It shuold:
- upload a file from client (works)
- extratc ascii from html (works)
- show the sentence number X (works for nr.0)
- create a button "following sentence" (does not work!)
- redirect to the same page and re-upload the same file to show the
sentence nr. X+1

~~~~~~~~~~~~~~~~~~~~~~~~~~~
HERE the first problem:
the button (note line 1,2,3):

print $number,$br;
$number++;
print $number,$br;

print $pagina->start_multipart_form(-method=>"POST",-action=>$here);
print $pagina->hidden(-name=>"locale",-value=>"$locale");
print $pagina->hidden(-name=>"remoto",-value=>"$remoto");
print $pagina->hidden(-name=>"number",-value=>$number);
print $pagina->submit("following sentence");
print $pagina->endform();

the html output:

1<br/>
2<br/>
<form method="post"
action="http://baolian.local/cgi-bin/e-allora/tac/tac01a.pl"
enctype="multipart/form-data">
<input type="hidden" name="locale" value="94_05.html" />
<input type="hidden" name="remoto" value="" />
<input type="hidden" name="number" value="1" />
<input type="submit" name="following sentence" value="following
sentence" /><div></div></form>

~~~~~~~~~~~~~~~~~~~~~~~~~~
the second problem:

why the script doesn't upload the "locale" input?:

if(!$remoto)
{$locale = $pagina->upload("locale");}

How can I do it without creating temporary files?


Thank a lot,

alladr


|^|_|^|_|^| |^|_|^|_|^|
| | | |
| | | |
| |*\_/*\_/*\_/*\_/*\_/* | |
| |
| |
| |
| http://www.e-allora.net |
| |
| |
**************************************

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com