[ic] form process before query??

Paul Jordan interchange-users@icdevgroup.org
Fri Jul 5 12:44:01 2002


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