Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass 2 hidden vars

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Hi All,

How can I pass 2 hidden variables from a redirect page? Let me paste my code to make my question more understandable:-


Council = Request.Form("Council")
Image = Request.Form("Image")

Set fs=Server.CreateObject("Scripting.FileSystemObject")
If (fs.FolderExists(Server.MapPath("\images\councillors\"+Council)))=false Then
set f=fs.CreateFolder(Server.MapPath("\images\councillors\"+Council))
Response.Write("Folder Created")
set f=nothing
set fs=nothing
End If
%>
<input name=&quot;CouncilName&quot; type=&quot;hidden&quot; id=&quot;Council&quot; value=&quot;<%=Council%>&quot;>
<input name=&quot;CouncilImage&quot; type=&quot;hidden&quot; id=&quot;CouncilImage&quot; value=&quot;<%=Image%>&quot;>
<%
response.Redirect(&quot;CouncillorsInsertPic.asp&quot;)
%>

Can you tell me how I can pass these 2 vars (CouncilName and CouncilImage) to the next page.....CouncillorsInsertPic.asp

Thanks for your help
 
use the query string on the response.redirect and bypass the hiddens:

eg.
Council = Request.Form(&quot;Council&quot;)
Image = Request.Form(&quot;Image&quot;)

response.Redirect(&quot;CouncillorsInsertPic.asp?council=&quot;& council & &quot;&image=&quot; & image & &quot;)&quot;

hope this helps




 
Thanks mate, it worked. I was just wondering if there is something else rather then passing this whole string to the other page? Ie I do not wish to show the whole string in the address bar if that is possible
 
if on the first page you Form Method = Post and use request.form as above it won't be shown in the address bar Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Ok thanks mate.

Great Pic! You made me laugh after a stressful day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top