All,
I'm fairly new to PHP, but not to programming... I understand the whole "stripping a cmd ID off of a URL" thing, but here's what I'm trying to do... I'm trying to write a psuedo-command-pattern framework for this little site I'm working on that are entirely database driven functions.
There will be strictly viewing, editing, modifying, updating, and other stuff like that... what I want to do is have the "...?cmd=0" in the URL get pulled off of $_GET['cmd'] and assigned to $cmd. Then, run a switch statement on $cmd and compare to the command IDs... 0, 1, 2, etc etc. Here's the thing... I'm thinking of writing the functionality for each type of cmd (let's say "0" is the "view" command) in separate PHP scripts. That way, if "cmd=0" in the URL, the switch statement switch($cmd) compares case 0: .... Anyway, say I want "0" to be "view", and I write a script to handle all static "view-only functionality" called "view.php". How can I redirect to the "view.php" functionality from the switch case? Do i have to include, or can I effectvely "Send over" to the other script and let it take over?
Hope you understand what I'm trying to say... thanks!
...tom