473,666 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Post form to external URL; redirect to local page

2 New Member
I'd like to submit a .php form to a url at an external site and redirect to a local
page, but am stumped and need some help.

Expand|Select|Wrap|Line Numbers
  1. <form ACTION="http://www.externalsite/post.php" method="post" name="thisForm" onsubmit="return validate(this)"></form>
  2.  
[Please use CODE tags when posting source code. Thanks! --pbmods]

Have tried adding a hidden input type but it doesn't seem to be working.

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="redirect" value="http://www. mysite.com/thanks.html" />
  2.  
Thanks, LeslieTP
Jun 12 '07 #1
6 9486
pbmods
5,821 Recognized Expert Expert
Heya, LeslieTP. Welcome to TSDN!

The external script has to do the redirection. If you don't have control over it, you'll have to get in contact with the developer for that site.
Jun 12 '07 #2
LeslieTP
2 New Member
Thanks! I'll be sure to use Code tags for my next post. I appreciate your prompt reply. So basically I need to contact the developer for the external site, and have them do the redirect for me back to my site? Thank you.
Jun 12 '07 #3
ronnil
134 Recognized Expert New Member
Heya, LeslieTP. Welcome to TSDN!

The external script has to do the redirection. If you don't have control over it, you'll have to get in contact with the developer for that site.
hmmm

wouldn't it be possible to POST the form via httpRequest and then redirect to the local page once that is done?

or does httpRequest not support accessing other domains like flash?

ofcourse this rules out any information printed by the external site...
Jun 12 '07 #4
pbmods
5,821 Recognized Expert Expert
wouldn't it be possible to POST the form via httpRequest and then redirect to the local page once that is done?
To prevent XSS, most browsers will disallow cross-domain AJAX requests. However, you could create a PHP script that sends the POST request to another site and then redirects the browser.

In general, though, if the external script can do it for you, it makes your life a lot easier.
Jun 12 '07 #5
Motoma
3,237 Recognized Expert Specialist
You could always perform your post in an invisible iframe, and have your main page do the redirect.
Jun 12 '07 #6
ronnil
134 Recognized Expert New Member
pbmods >> yea, thought that too :)

I think Motoma's solution sounds quite simple, and do-able....
Jun 12 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2301
by: David E. Smith | last post by:
I want to redirect input from one page to another, but it's POST content. If it were GET, I could just do something like: header("Location: /new/form.php?a=1&b=2") I can't rewrite the destination script, because it's proprietary. And compiled. And for Windows. A few details might help: I'm using Imail's Web-based email interface on one site, and the only form inputs available to it are username and password. The existing form looks...
9
7600
by: MDW | last post by:
Say I've got a page - myPage.asp - that expects to see the results of a form's POST operation. If it comes from the form, all is fine. However, if someone were to manually type the address in the address bar - http://www.mysite.com/myPage.asp - I'd like to be able to detect that they're trying to circumvent the form and redirect them to the appropriate page using Response.Redirect().
2
3120
by: Robert Oschler | last post by:
I am working on a PHP 4 app that interacts with an external authorization server. The external server does "third-party" authorization of users. So I do the following: 1) Each of my PHP scripts has an include file (require_once) that checks to see if the current user has recently been authorized. 2) If not, the user is "handed off" to the external server. I do this by building the necessary URL for authorization and using refresh to...
7
1999
by: Matt | last post by:
Hi all, Not very sure about this. I have one button (not a submit button) will "post" partial page(form) info to another url(the user will also redirect to this url :-). I dont' want to change the webpage interface, so how can I POST partial form info? by using a tmp url??? TIA
4
2596
by: Wayne P. | last post by:
I'm working on a shopping cart webapp and I need to perform a form POST of data to a 3rd party site (a payment processor, StormPay). I seem to be having problems doing this. I have an image button which when clicked performs the data validation. After successful validation, I need the browser to redirect to the payment processer with a form post. How can I do this? I have tried a few things, failed. Below were my most 'reasonable...
10
3418
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
1
4255
by: David | last post by:
I need to redirect to a page and HTTP Post data. The Response.Redirect does not work and the HTTPREQUEST option calls the page and waits for a response, but I need to transfer control to the page. Eg. Redirect and POST data. The only way I can see to do this is to format a HTML/POST, with Javascript, page and use the RESPONSE.WRITE option. Thanks
5
2435
by: Tyler | last post by:
I am developing an application which will allow me to automatically sign into an external website. I can currently do a screen scrape using HTTPWEBREQUEST. However I want to just redirect to the external site. No need to pull back any data. Here is the code I am using. Dim encoding As ASCIIEncoding = New ASCIIEncoding Dim myParams As String = "AccessID=" & sUserID & "&Password=" & sPassword
56
7214
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my website. The issue is that I need to gauge whether a user has any items in their basket to decide which page I redirect them too. I could
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.