| re: Dynamic Variables
When you want to pass parameters to script that you want to be called (in this case index.php), you append the parameter keys and values to the called script name, prefixed with a question mark. E.g. when you want to link to program XYZ.PHP and you want to pass parameter key PARM with value ABC, you would code it like:
[HTML]href=“XYZ.PHP?PARM=ABC“[/HTML]
In XYZ.PHP you can now extract the passed value ABC from entry PARM in the $_GET array.
When you want to pass more parameters to the called script, let´s say you also want to pass NUMBER=123 you must separate the various parameter key=value strings with an amsersand &. So adding the extra becomes
[HTML]href=“XYZ.PHP?PARM=ABC&NUMBER=123“ [/HTML]
In XYZ.PHP you can now extract both values ABC and 123 from entries PARM and NUMBER, both in the $_GET array.
I strongly advise you to follow a few HTML and maybe PHP tutorial, because this is all really basic stuff. Good luck!
Ronald :cool:
|