Hi, I was wondering, if it is possoble (or how to) include a php file with a get form value passed.

For Example: states.php?state=NY.

This file would be incuded into another php file so that it would display only the items that would be in NY state.

Anyone know how to do this??

Help is greatly appreciated.

Hi, I was wondering, if it is possoble (or how to) include a php file with a get form value passed.

For Example: states.php?state=NY.

This file would be incuded into another php file so that it would display only the items that would be in NY state.

Anyone know how to do this??

Help is greatly appreciated.

There are probably several ways of accomplishing this. One would be to simply use file_get_contents to load the file text into a string and then do whatever you like with it.

Not sure just why you want to do things this way. At the very least you should sanitize the user input so you don't end up squirting back sensitive files. For instance someone might try to browse to

states.php?state=.htaccess or states.php?state=mybusinessdata.db

Hi, Sorry I didn't post back earlier. I finaly figured out how to do what I wanted. Thanks.

This question has already been answered. Start a new discussion instead.