form calling action of a page on another domain

Discussion in 'HTML & Website Design' started by daboss, Jan 5, 2009.

  1. #1
    hi,

    is the following scenario possible?

    in domain A, i have a page that contains a form. this form will call a page in domain B.

    <form name=name method=post action=[COLOR="Red"]domainBpage.php[/COLOR]>
    Code (markup):
    is this possible?
     
    daboss, Jan 5, 2009 IP
  2. Brukhar

    Brukhar Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as I know, you can, you just have to include the full link to domainB (no relative links otherwise it will obviously be on your own domain :p). Also, obviously the domainB page must have all the appropriate code otherwise it won't work.
     
    Brukhar, Jan 5, 2009 IP
  3. nyxano

    nyxano Peon

    Messages:
    417
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I believe the syntax would be:

    <form name=name method=post action=http://www.DomainB.com/domainBpage.php>
    Code (markup):
    When DomainBpage.php is done, you'd still be on Domain B unless you redirect the person back to Domain A.

    The only other way you could do it would be to use Curl within PHP. This way, you can keep the person on Domain A and post all data to DomainBpage.php using Curl. Any data returned by DomainBpage.php can then be stored in a variable to use in the output page on Domain A
     
    nyxano, Jan 5, 2009 IP