Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Post to CGI
Pages: [1] Print
Author Topic: Post to CGI  (Read 1277 times)
Amanita
Newbie
*
Offline Offline

Posts: 19


View Profile
Post to CGI
« on: January 26, 2004, 12:56:22 PM »

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
Full Member
***
Offline Offline

Posts: 113


View Profile
Post to CGI
« Reply #1 on: January 26, 2004, 01:43:49 PM »

uri: http://mycgi.script.pl

var1: "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
Newbie
*
Offline Offline

Posts: 19


View Profile
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?

Code:

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...

Sad  
Logged
Graham
Full Member
***
Offline Offline

Posts: 113


View Profile
Post to CGI
« Reply #3 on: January 26, 2004, 10:21:30 PM »

Code:
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
Newbie
*
Offline Offline

Posts: 19


View Profile
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.


Cheesy  
Logged
Graham
Full Member
***
Offline Offline

Posts: 113


View Profile
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
Newbie
*
Offline Offline

Posts: 19


View Profile
Post to CGI
« Reply #6 on: January 27, 2004, 09:43:35 AM »

Quote
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] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Post to CGI
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 01:58:19 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2248 Posts in 586 Topics by 2512 Members
Latest Member: Jhvdyatb

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc