Dave.O wrote: > I am trying to run a php script with query from wthin another php script. > > I have a php script that adds information to a database and calls another > php script with query to view those details using the include command but I > keep getting an error "Failed opening" file. > > Is there anyway of running a php script with the "?var=string" query inside > another php script ??? using 'include("secondfile.php");' should do the trick. The second script is, for all intents and purposes, essentially inserted into your first script at the point of the 'include' statement. There is no need to pass variables, although the usual global/local variables issues still apply with regard to functions (ie drop the ?var= stuff). If you continue to get "Failed opening" type error messages check the read and execute permissions on the second script. Can the second script be run directly via a browser? Is the path to the second script used in your include statement correct? - Ben -- 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]