|
Pages: [1]
|
 |
|
Author
|
Topic: Post to CGI (Read 1229 times)
|
|
Amanita
|
Is their a command that allows me to post to a regular perl script?
For example I have looked at the mailer examples but instead of sending the mail I would like to post the info. to a regular form to mail script written in perl on my website.
|
|
|
|
|
Logged
|
|
|
|
|
Graham
|
 |
Post to CGI
« Reply #1 on: January 26, 2004, 01:43:49 PM » |
|
uri: http://mycgi.script.plvar1: "myname" data1: "Graham" var2: "password" data2: "*****" result: read/custom uri reduce [ 'POST rejoin [ var1 "=" data1 "&" var2 "=" data2 ]] should do it. If you are not allowed to post without using cookies, see my http-tools.r script in the rebol.or library.
|
|
|
|
|
Logged
|
|
|
|
|
Amanita
|
 |
Post to CGI
« Reply #2 on: January 26, 2004, 02:52:33 PM » |
|
So are you saying that var is similar to the input field in a regular html form? layout [ styles t-styles backdrop white box 400x400 blue at 4x4 btn3 "x" [unview] uri: http://domain.com/cgi-bin/amail/aform.cgi
var1: "myname" data1: "Graham" var2: "password" data2: "*****"
btn "submit" [result: read/custom uri reduce [ 'POST rejoin [ var1 "=" data1 "&" var2 "=" data2 ] ] ]
I'm not sure how to initiate it to send, above I tried to use a button but that doesnt work...
|
|
|
|
|
Logged
|
|
|
|
|
Graham
|
 |
Post to CGI
« Reply #3 on: January 26, 2004, 10:21:30 PM » |
|
mylo: layout [ box 200x100 at 90x10 button "x" [unview/only mylo ] at 10x90 btn "submit" [ submit ] ]
uri: http://domain.com/cgi-bin/amail/aform.cgi
var1: "myname" data1: "Graham" var2: "password" data2: "*****"
submit: does [ result: read/custom uri reduce [ 'POST rejoin [ var1 "=" data1 "&" var2 "=" data2 ] ]]
view center-face mylo
|
|
|
|
« Last Edit: January 26, 2004, 10:27:30 PM by Graham »
|
Logged
|
|
|
|
|
Amanita
|
 |
Post to CGI
« Reply #4 on: January 27, 2004, 01:29:23 AM » |
|
Thank you for the help Graham, I think I'm starting to understand it now.
|
|
|
|
|
Logged
|
|
|
|
|
Graham
|
 |
Post to CGI
« Reply #5 on: January 27, 2004, 03:31:02 AM » |
|
I think you were getting a little confused by putting code into the layout. The layout is a special rebol dialect that is parsed by the vid dialect parser.
So, in other words, it's a different language in the layout.
Much as parse dialect is different...
|
|
|
|
|
Logged
|
|
|
|
|
Amanita
|
 |
Post to CGI
« Reply #6 on: January 27, 2004, 09:43:35 AM » |
|
I think you were getting a little confused by putting code into the layout. You are correct, as a matter of fact I did the same thing while trying to figure out how to make an address book. I just ordered REBOL for Dummies, maybe it will help me grasp the fundamentals.
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |
News: 01-09-08 Alpha version of REBOL 3 has been released!
2235 Posts in 583 Topics by 1757 Members
Latest Member: Xzycdysz
|