Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
LuckyNinja #1
redirect but with post data - mimick form post behaviour
Any thoughts on how to mimic result of submitting form data via POST Method? I
have some code that sanitizes some submitted formfields and i'd like to
redirect the user to another page and carry over that data but not reveal it in
the URL.
LuckyNinja Guest
-
#22427 [Com]: Missing Form Post Data
ID: 22427 Comment by: zero at tilt dot eu dot org Reported By: jroland at uow dot edu dot au Status: No... -
Email form data AND post to a page
Newbie here... Can anyone help me? I am able to email form data successfully via CFmail upon submit. I am able to post the data to a page after... -
How to post some data in form of POST action of forms in asp?
Hi there, I need to post some information into an ASP page (mypage.asp), in form of POST action which I do with the following code: 'contents... -
form data will not post
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to ... -
ASP, FORMS, POST METHOD And Post with out form(???)
Lets see if I can decribe, this... I have a form on an html page, that will call a remote site with a post method. Prior to running off to the... -
Stressed_Simon #2
Re: redirect but with post data - mimick form postbehaviour
Set all the data in the SESSION scope and then you can reference it on the later pages!
Stressed_Simon Guest
-
LuckyNinja #3
Re: redirect but with post data - mimick form postbehaviour
I was thinking that, just build a struct and put it into a session var. But i really don't need this data to go into a session to use it later.
LuckyNinja Guest
-
jhandfield #4
Re: redirect but with post data - mimick form postbehaviour
Depending on how controlled the user base is with regards to Javascript, you
could use Javascript to do it. On the redirecting page, recreate the form (you
could use all hidden form variables so they don't actually see anything) then
put in a form.submit() call to automatically submit the form which will, in
turn redirect the user. Stressed_Simon's suggestion of using the session scope
will work as well, and be much more reliable if you're making an application
for use by the general public. Something like: On the redirecting page, before
the redirect: <cfset session.form_vars = Duplicate(form)> On the destination
page: <cfif IsDefined('session.form_vars')> <cfset form =
Duplicate(session.form_vars)> <cfset StructDelete(session,'form_vars')>
</cfif> The first piece of code would copy your entire form scope to a session
variable, then the second piece would get called and move the copied form scope
back out of the session and into the form scope where it belongs, then delete
it from the session scope to prevent it from hanging around forever and
potentially screwing up subsequent executions. (Note that I haven't tested
this code, but I'm pretty sure that's what I used when I had the same problem
some time back)
jhandfield Guest
-
sdsinc_pmascari #5
Re: redirect but with post data - mimick form postbehaviour
Why not resubmit the sanitized fields with the CFHTTP tag?
sdsinc_pmascari Guest



Reply With Quote

