Hey all,
Im in the process of trying to add a search option to my website, I was hoping to post the parameters from my webform to a php module ie.
action="view.php?module=search"
is this even possible?
Thanks in advance :happysad:
Hey all,
Im in the process of trying to add a search option to my website, I was hoping to post the parameters from my webform to a php module ie.
action="view.php?module=search"
is this even possible?
Thanks in advance :happysad:
Last edited by cosmicsafari; 09-08-2008 at 05:24 AM.
"Knowledge speaks, but wisdom listens."Jimi Hendrix
I'm not sure what you're asking.
If the module is installed, it should work by default...
However, if you're trying to pass parameters to your PHP script, you can use the GET commands.
In which case, you could do the following:
Then if somebody accesses that page via the URL myscript.php?action=view&module=searchCode:if (isset($_GET['action'])) $action = $_GET['action']; if (isset($_GET['module'])) $module = $_GET['module'];
then the values for $action and $module will become 'view' and 'search'.
I do not recommend using 'view.php', then including that file (or w/e).
Use the following instead:
Edit:Code:if (!file_exists("pages/$action.php")) $action = '404'; require_once ("pages/$action.php");
See here for more info.
Last edited by Scoochi2; 09-08-2008 at 06:27 AM. Reason: Automerged Doublepost
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts: