470,602 Members | 1,560 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

Passing variables from a PHP page to an ASP page?

Here's a question for you:
I have a site using a PHP CMS and I need it to use an ASP module from
another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).
I created a frame page in the php hosting with a 1px top frame and the
main frame pointing to the asp page but of course the variable is not
being passed.....if I put the ASP connection code on the frameset page
it doesn't recognize it because the hosting is a Unix/PHP hosting
only.
My question to you is:
Can a variable be passed from the php to the ASP webspace using some
other technique?
I just need to have the ASP module showing as if it is in the PHP.....

Thanks,

FayeC
Dec 7 '05 #1
6 4159
How about using cUrl to fetch the page and then display it...

Here's a question for you:
I have a site using a PHP CMS and I need it to use an ASP module from
another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).
I created a frame page in the php hosting with a 1px top frame and the
main frame pointing to the asp page but of course the variable is not
being passed.....if I put the ASP connection code on the frameset page
it doesn't recognize it because the hosting is a Unix/PHP hosting
only.
My question to you is:
Can a variable be passed from the php to the ASP webspace using some
other technique?
I just need to have the ASP module showing as if it is in the PHP.....

Thanks,

FayeC

Dec 7 '05 #2
Hmmmmmm.....I have no clue on how to do that but that's a tip.....off
to get googling....
Any more info??

FayeC

On Tue, 06 Dec 2005 21:14:21 -0600, Mike Willbanks <pe****@gmail.com>
wrote:
How about using cUrl to fetch the page and then display it...

Here's a question for you:
I have a site using a PHP CMS and I need it to use an ASP module from
another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).
I created a frame page in the php hosting with a 1px top frame and the
main frame pointing to the asp page but of course the variable is not
being passed.....if I put the ASP connection code on the frameset page
it doesn't recognize it because the hosting is a Unix/PHP hosting
only.
My question to you is:
Can a variable be passed from the php to the ASP webspace using some
other technique?
I just need to have the ASP module showing as if it is in the PHP.....

Thanks,

FayeC

Dec 7 '05 #3
NC
FayeC wrote:

I have a site using a PHP CMS and I need it to use an ASP module
from another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).


There's one missing piece in your description of the problem. Will the
ASP page accept a GET variable or does it have to be POST?

In the first case, everything can be done rather simply; you put out a
frameset that looks something like this:

<FRAMESET rows="1, *">

<FRAME name="top" src="myscript.php">
<!-- This is a PHP script on your site -->

<FRAME name="bottom"
src="http://othersite.com/otherscript.asp?user=FayeC">
<!-- This is a link to an ASP script on the other site -->

</FRAMESET>

The second case is mucn more complicated...

Cheers,
NC

Dec 7 '05 #4
you can pass variables by using query string
http://othersite.com/otherscript.asp?user=FayeC to asp page and then
over then you can retrieve it by either:
u=request('user')
or
u=request.querystring('user')

Dec 7 '05 #5
Nope....it has to be POST. The variable is coming from a form on an
html page hosted on a UNIX/PHP server and is linking to a page on the
ASP hosting space.
I just wanted to make it look seamless by cloaking the second
subdomain.
I am not that experienced in PHP to smack a cURL script....I was
reading on it and I found out that the PHP hosting does support it.

FayeC

On 7 Dec 2005 00:15:02 -0800, "NC" <nc@iname.com> wrote:
FayeC wrote:

I have a site using a PHP CMS and I need it to use an ASP module
from another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).


There's one missing piece in your description of the problem. Will the
ASP page accept a GET variable or does it have to be POST?

In the first case, everything can be done rather simply; you put out a
frameset that looks something like this:

<FRAMESET rows="1, *">

<FRAME name="top" src="myscript.php">
<!-- This is a PHP script on your site -->

<FRAME name="bottom"
src="http://othersite.com/otherscript.asp?user=FayeC">
<!-- This is a link to an ASP script on the other site -->

</FRAMESET>

The second case is mucn more complicated...

Cheers,
NC

Dec 8 '05 #6
FayeC wrote:
Nope....it has to be POST. The variable is coming from a form on an
html page hosted on a UNIX/PHP server and is linking to a page on the
ASP hosting space.
I just wanted to make it look seamless by cloaking the second
subdomain.
I am not that experienced in PHP to smack a cURL script....I was
reading on it and I found out that the PHP hosting does support it.


What is being hosted on what system is really beside the point.

A frame is no different from any other page - you can only communicate
to it via HTTP/HTML. If the frame content is to be specified by a link
it will be retrieved by GET so you can use CGI arguments, but there's no
way of giving it POST data. But there's nothing to stop you using a form
to specify the frame, if this fits your user interaction model. Just
give a TARGET parameter to the FORM statement as well as the ACTION and
METHOD parameters.

Of course what I said above isn't quite true any more, since the
invention of cookies. Cookies are client side, so it's perfectly
possible for your calling script to weasel away any information in
cookies in the browser, and the called script in the frame to read them.
But I get the impression that your ASP script is a given, in which case
the FORM method above is the only way I can think of.

Colin
Dec 8 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Consuelo Guenther | last post: by
3 posts views Thread by Lee | last post: by
2 posts views Thread by Jim Heavey | last post: by
7 posts views Thread by Khai | last post: by
28 posts views Thread by Skeets | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.