Posted by Jerry Stuckle on 03/14/06 06:23
IWP506@gmail.com wrote:
> Hi
>
> I have a page that returns data based on the arguments provided to it
> in the URL. I want to show these results embedded in another page.
> Include('mypage.php?name=joe') fails with "failed to open stream:
> Invalid argument". How can I do this?
>
> Thanks
>
> IWP506
>
The file name is not 'mypage.php?name=joe', is it? That is, do you see
that in your directory listing?
When you use GET parameters, the web server strips them out before
fetching the file. include() does not such thing.
Include just copies the included file into the location in your existing
file, just as if you had cut and pasted it. So, if you have:
$name='joe';
include('mypage.php');
Within mypage. php you can just reference $name and get 'joe'.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|