[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] how do i pass a cgi value to embedded perl script.
****** message to minivend-users from "kyle@invisio.com" <kyle@invisio.com> ******
Here is a simple way to do what you want:
Somewhere on a page:
<form action="[process-target]" method="POST">
<INPUT TYPE="text" NAME="CustomerName" VALUE="20"><br>
<input type="Submit" name="mv_submit" value="Send">
<input type="Hidden" name="mv_doit" value="return">
<input type="Hidden" name="mv_nextpage" value="mail_page">
</form>
Then on page "mail_page.html" :
[if value CustomerName ne ""]
[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]
PS. Shooting potential customers may be illegal in some areas,
and is not a good business practice ;-)
Kyle (KC)
At 11:08 PM 4/1/00 -0800, you wrote:
>****** 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
-
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