Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Forms using POST

From: rebol:meurrens at: 2-Jul-2003 23:51

Hi John, A very very simple form + test is Just read the HTML source to understand how simple it is. The source of the correspondingform's ACTION is visible at and is also very simple , it looks like.... (with a few more print's) do %make-cgi.r cgi: make-cgi print [ cgi/echo/ip ] print [ cgi/echo/host ] probe cgi/form This REBOL script that you may want to use to test/debug your form isin fact : Just replace your own ACTION by the above URL, and my script will show you all your fields as it does in my own examples. More complex forms and scripts are available at the URL such as scripts to upload one file, multiple files, etc... At 13:52 2/07/2003 -0500, you wrote:
>Can someone send me both html FORM AND REBOL SCRIPT for a simple form >using, POST so that I can analyze why mine are not working.
Again, the best way to debug your form is to replace your action by a script that dumps your input, such as or (providing additional reports)
>I stress "SIMPLE" that "WORKS". LOL..
Sorry, but in this case "SIMPLE" AND "WOKS" are contradictory... You may write a simple script for 'get method, or for 'post method. It's more complex if you want a script that works for both. And still more complex if you want to use multipart/form-data (uploading files, etc). And a little bit more complex if you want to accept multiple fields that share the same name. And it is still much more complex if you want a script that works effectively with all browsers, on all client platforms and with all HTTP servers... So why not "SIMPLY" using the script make-cgi.r It's a robust script. Fully documented. Extensively commented. Free. Embedding other related works produced by the community (Carl, Andreas, Olivier, etc). Tested and improved by the Rebolers. Well, it may takes a few hours to understand it completely. { I am verbose :-) ... } But, yes, it works and it is used in production !!! And you may use it without a knowledge of the internals. The API is described on the site. But, on the other hand, if you decide to spend the few hours needed to understand every line of then CGI with REBOL will have no more secret for you. Your own scripts may effectively become very "SIMPLE" (such as my sample script form.reb holding in 3 lines of code do %make-cgi.r cgi: make-cgi probe cgi/form that you may even reduce to 2 lines if you use the appropriate make-cgi refinement and are not interested in other cgi details do %make-cgi.r probe make-cgi/form ) even if, behind, there is a lot of code within make-cgi.r Documentation + all sources + pretty HTMLified sources are on the site Hope this helps, </marc>
Prof. Ir Marc Meurrens, Brussels (be) TEL: +32 (0)2 537 2812 FAX: +32 (0)2 537 7645 EMAIL: [marc--meurrens--org] URL: REB: PGPKEY: Please don't mail me attached files, instead, use my 'exchange area' : EXCHANGE AREA: (HTTP/FTP upload/download of temporary/persistent files)