Not sure if this is hat you are looking for, but I do something similiar in
my script. Its set up so that the action of the script depends on whether
or not the ASIN was passed in..
if(isset($asin))
{
$mode='save_info';
}
that way if something like: "book_reviews.php?asin=000129091" is called,
then it will save the information, but if "book_reviews.php" is passed, then
its not defined and it goes to a different mode (which in my case is a form
to get the information)
- John Vanderbeck
- Admin, GameDesign
----- Original Message -----
From: "August Malson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 2:11 AM
Subject: [PHP] test for undefined variables & renaming variables
> Q:
> Does anyone know of a way to test for undefined variables? For example, I
> am sending a variable into the page, but the processing of the page
depends
> on what is being passed to the page.
>
> Say, I am typing the following on the location bar:
> index.php?fuseaction=something&fuse=6
>
> and I want something to happen if fuse is actually declared, and something
> else to happen if fuse is not defined.
>
> I have tried isdef(), but that function does not seem to work, and I
> couldn't find it in the manual when I was looking for it.
>
> Code to use on:
>
> if($HTTP_GET_VARS("fuse") == NULL) then do something; else do something
> else;
>
>
> Q:
> Also, does anyone know how to rename a variable?
>
> I want to create a variable $attributes_NameOfVariable, but it does not
seem
> to work. is there a function that exists in PHP that will assist me in
this
> process?
>
> Thank you for all of your help, and thank you for your time,
>
> August Malson
>
>
> --
> 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]