[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] form process before query??
At 09:43 AM 7/5/2002 -0700, you wrote:
>Hi
>
>I am trying to complete a sql query with a cgi form variable, then process
>the form. Here is what I have:
>
><FORM ACTION="[process-target]" METHOD="POST" name=invite>
><INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
><INPUT TYPE=hidden NAME=mv_todo VALUE="return">
>
> [query
> ml=30
> type=list
> sp="@@MV_PAGE@@"
> sql=|
> SELECT boxname
> FROM mb_boxlist
> WHERE username = '[data session username]'
> AND boxname != 'main'
> ORDER BY boxname
> |]
> <SELECT NAME=c_box>
> [list]
> <OPTION VALUE="[sql-param boxname]">[sql-param boxname]
> [/list]
> </SELECT>
> [/query]
>
><input type="text" name="c_name" value="">
><input type="text" name="c_email" value="">
><TEXTAREA WRAP="virtual" ROWS="4" COLS="35" name="c_comm"
>value=""></TEXTAREA>
>
>[button
> form=invite
> text="Send"
> src="__BUTTON_DIR__/change.gif"
> hidetext=1
> align="right"
> ]
>
>[if cgi c_email]
>
> [query
> ml=1
> sp="@@MV_PAGE@@"
> type=list
> sql=|
> SELECT password
> FROM mb_boxlist
> WHERE username = '[data session username]'
> AND boxname = '[cgi c_box]'
> |]
> [list]
> <input type=hidden name="c_pass" value="[sql-param password]">
> [/list]
> [/query]
>
> mv_nextpage=c_invite
>
>[/if]
>[/button]
>
> </form>
>-----------------------------------------------
>
>I thought maybe lowering the mv_nextpage would do it, but it does not. Or
>wrapping it in an [on-match] pair. I have tested all queries, and they do
>work as written. I am thinking it is some positional thing that I do not
>understand. mv_todo=return seems like it is the things to do, but what am I
>missing?
>
>I need the query to make the hidden input, and include it in the form
>submission. The -- type=hidden name="c_pass" -- is the only thing I can't
>pass :(
>
>Paul
In order to run SQL using CGI variables, you have three options:
* mv_click
* mv_check
* on the next page
Of course, the first two do not display output. So try putting your SQL
code on the page this goes to (apparently 'invite') and see what
happens. (Or you can put it in a mv_check, store the output, and then
display it).
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Kavod Technologies <db@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... and furthermore ... I don't like your trousers.