tcl-mod_dtcl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bass <b...@eggheads.org>
Subject Re: GET and POST variables
Date Tue, 16 Jul 2002 17:44:57 GMT
<html>
Yes, it should be possible to read both GET and POST data
simultaneously.<br><br>
Look at $ENVS(REQUEST_METHOD) to check for GET/POST.<br><br>
Even when the case is POST, you *should* be able to read the GET
parameters by parsing/splitting the data from $VARS(REQUEST_URI).&nbsp; I
haven't actually tested it, though, but I don't see why REQUEST_URI
wouldn't return the correct information.  <br><br>
Again, this is a case for &quot;why would you want to do that?&quot;, but
if you want to do a security check for both, this method should
work.<br><br>
Good luck.<br><br>
At 11:52 AM 7/16/2002, you wrote:<br>
<blockquote type=cite class=cite cite><font face="arial" size=2>Thanks
</font><font face="Times New Roman, Times">Mark Hubbard
</font><font face="arial" size=2>for answer me.</font><br>
<font face="arial" size=2>But, what happend if in $ENVS exists Post and
Get variables?</font><br>
<font face="arial" size=2>For Example:</font><br>
<font face="arial" size=2>&lt;form method=post
action=&quot;page.ttml?var1=1&quot;&gt;</font><br>
<font face="arial" size=2>&lt;input type=hidden name=var1
value=2&gt;</font><br>
<font face="arial" size=2>&lt;/form&gt;</font><br>
&nbsp;<br>
<font face="arial" size=2>In ASP or PHP i can get the value of all
versions of var1.</font><br>
<font face="arial" size=2>ASP example:</font><br>
<font face="arial" size=2>Var1Post =
request.form(&quot;var1&quot;)</font><br>
<font face="arial" size=2>Var2Get =
request.querystring(&quot;var1&quot;)</font><br>
<font face="arial" size=2>then</font><br>
<font face="arial" size=2>Var1Post = 2</font><br>
<font face="arial" size=2>Var1Get = 1</font><br>
&nbsp;<br>
<font face="arial" size=2>Can i do this with TCL and Mod_Tcl
?</font><br>
&nbsp;
<dl>
<dd>----- Original Message ----- 
<dd>From:</b> <a href="mailto:markh@dcisite.com">Mark Hubbard</a>

<dd>To:</b> <a href="mailto:bd@ciudad.com.ar">Damian Bacalov</a> 
<dd>Sent:</b> Tuesday, July 16, 2002 12:15 PM
<dd>Subject:</b> Re: GET and POST variables<br><br>
<font size=2>
<dd>You can do an hgetvars and then check the value of
$ENVS(REQUEST_METHOD) to see if the HTTP method was GET or POST.&nbsp;
That can be used in your script logic.&nbsp; ENVS is actually
request::ENVS (something which is apparently not documented).</font>
<dd>--
<dd>Mark Hubbard:
<a href="mailto:markh@dcisite.com">markh@dcisite.com</a>
<dd>Microsoft Certified Professional
</dl></blockquote></html>


---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Mime
View raw message