You don't need to go through these hoops.

Any include page you use will automatically use any variable that has been set in the 
master page.

Thus, all you need to do is include the book_reviews.php page, and the $asin variable 
will work in that one IF it has been set in the master file.  If it hasn't, it won't, 
very simple.

>From the look of it, it appears the book_reviews.php page also checks to see if the 
>$asin variable is passed, and that check will also work when it's an include page.

So, basically you could replace your code with this:

<?
    include("book_reviews.php");
?>

and you don't have to worry about the $asin variable, since the     book_reviews.php 
page handles that.  If it's set, book_reviews.php will see it and use it.  If it's not 
set, book_reviews.php will also see that and work without it (since you've already 
told it how to handle that).


---------- Original Message ----------------------------------
From: "John Vanderbeck" <[EMAIL PROTECTED]>
Date: Thu, 8 Feb 2001 12:27:20 -0500

>I need to be able to do:
>
><?
>if (isset($asin))
>{
>    include("book_reviews.php?asin=$asin");
>}
>else
>{
>    include("book_reviews.php");
>}?>
>
>This is embeded in one of my sites pages..However, the call with the var
>added on won't work, it seems like its looking for a file with that whole
>name.  Does anyone know how I can do this?
>
>- John Vanderbeck
>- Admin, GameDesign
>
>
>-- 
>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]
>
>

-- 
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]

Reply via email to