[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] how do i pass a cgi value to embedded perl script.
****** message to minivend-users from Syam Sundar Pannala <syam@c915525-a.sttln1.wa.home.com> ******
hi,
Summary: How do i pass the values of a CGI submit to a
piece of embedded perl code? The $a = '[cgi a]' seems
to get interpreted after the script and $CGI variable
does not seem to be set (well actually so do Document
and Values).
Explanation:
i have a form which looks something like this.
<FORM METHOD=POST ACTION="[area process-order]">
<INPUT TYPE=hidden NAME=mv_action VALUE=submit>
<INPUT TYPE="text" NAME="CustomerName" VALUE="20">
</FORM>
and the process-order page looks like this.
[if explicit]
[condition]
$name = '[cgi CustomerName]';
$name_is_valid = 0;
if($name ne "")
{
$name_is_valid = 1;
}
return $name_is_valid;
[/condition]
[then]
Yeah okay okay. I will send mail to appropriate people.
[/then]
[else]
<B> Form fill out mistake.
I think i will have to shoot you now. </B>
[/else]
[/if]
Ofcourse, $name ne "" is always true because the the MML is
interpreted _after_ the script got eval'ed. How do i pass
the values to the script then?
I have tried using $CGI->{'CustomerName'} without
any success. Any obvious problems ? or is it just a mysterious
curse ?
[i tried a $num_keys = scalar(keys %$CGI) which gave me zero]
I also remember trying [process] instead of are, dont remember
the failure mode now.
thanks,
syam
And the cheerful penguin ate the newbie.
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list