Lately I have been working on a script and my plan is to have the URL pass an initial variable to the script. So for example, the URL would be http://WhereEverServer.com?questionFileName=testQA. This variable called questionFileName is the name of a file (without the extension) that the script will use to pull a series of questions from. What I would like to have the script do is to check if a variable was passed, and to check if the file name passed actually exist. If either case is false then I would like to have it check if the file testQA exist and if so then the script would run using this test file, if not then the script would just terminate giving the user an error message. I was wondering how you would do this? Right now I have it semi-working, but it is very convoluted and if the variable is not passed it displays a "Warning: Undefined variable: questionFileName in c:\server\apache\htdocs\survey\questionanswer.phtml". Ideally it would not display this message and just check if the testQA file is around and if not then just terminate with an error message of my choice. -Thanks for any ideas, Andrew V. Romero To reply personally, remove all numbers from my address. -- 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]