PHP, include with parameters
Posted
by
chris
on Stack Overflow
See other posts from Stack Overflow
or by chris
Published on 2011-01-04T21:44:03Z
Indexed on
2011/01/04
21:54 UTC
Read the original article
Hit count: 286
php
hi!
I have a PHP-file which will be called from a form. So it gets parameters over $_GET.
Now I need the exact same functionality of this file, but not in such a form-call. I will include it in normal code with fixed parameters (which normally come from the form). So my file can work with the form AND without it.
I know only the way with include and setting the $_GET in front of it. But I am not sure this is the most elegant way (I dont like the idea of setting things like $_GET).
any other ways of doing this?
br, chris
© Stack Overflow or respective owner