On Wed, 25 Jul 2001 10:26, John Holcomb wrote:
> Help please!
>
> I'm trying to use an include with my HTML file.
> Inside my HTML file I've tried:
>
> 1)
> <script language="php">
>
> include("/export/home/bayarea.net/htdocs/webclient.php3?id=2");
> </script>
>
> AND
>
> 2)
> <script language="php">
>
> include("http://www.bayarea.net/webclient.php3?id=2");
> </script>
>
>
> According to the PHP documentation #2 should work, but
> I keep getting an error saying that it's unable to
> include the file. #1 works when I leave off ?id=2,
> but I need to pass it a variable. Any help would be
> appreciated.
>
> Thanks,
>
> John
All include does is place the contents of the included file in your
current file (simplified explanation, but close enough).
If it is a local file you are including, just assign the value to the
variable and then include the file:
<script language="php">
$id = 2;
include("/export/home/bayarea.net/htdocs/webclient.php3");
</script>
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
Useless Invention: Inflatable darts-board.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]