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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfhttp post to new page

Status
Not open for further replies.

r0bbb

Programmer
May 16, 2006
4
0
0
GB
Hi

Im trying to use cfhttp to post some variables to a new page. I then want the new page to be displayed, so i am using redirect="yes", but it is not redirecting, just staying on the posting page. Here is the code i have in the posting page and the redirect page:

post.cfm

<cfhttp url="receive.cfm" method="post" redirect="yes">
<cfhttpparam name="SessionID" value="#SessionID#" type="FormField">
<cfhttpparam name="Amount" value="#Amount#" type="FormField">
</cfhttp>

receive.cfm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>
<body>
<cfoutput>
#Amount#
</cfoutput>
</body>
</html>

ive read somewhere that you need to return location in a header or something, but i cant find any examples or explanations. Does anyone know how this is done? Also once I am on the redirected page, how do i access variables sent from the post page?

Thanks

Rob
 
Can anybody point me in any kind of direction? im having no luck.

thanks

Rob
 
cfhttp is mainly for use with websites other than your own, i.e. someone else's website hosted on another server. If you're trying to pass info to another page on your site, you can just do it Url variables, or Forms, or Sessions, or any other means of locally passing info throughout your site.

What exactly are you trying to accomplish? Maybe we can help.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top