Web programming >> start php skirpt with veriable
Posted by Henning on 23:42:00 06-27-2002
How i can start an php skript with a variable
i have a textfile with name sub so i have make it so but it doesn´t work:
www.domain.com/skript.php?sub=variable
[addsig]
Posted by MoX on 01:33:00 06-28-2002
Do it like this:

www.domain.com/script.php?textfile=NAME_OF_TEXTFILE

In your php code you can now use $textfile as a variable. [addsig]
Posted by KaGez on 13:04:00 06-29-2002
and, if you wanna have more parameters, do it like this:
script.php?var1=test[b]&[/]ver2=test2
This will give you $var1 (with the ocntents "test"), and $var2 (with the contents "test2"). If you pass a string in there, with spaces, do it like this:
script.php?var1=Hello+You+There
This is the same as doing
$var1 = "Hello You There"
[addsig]
Posted by HelloWorld on 22:57:00 07-20-2003
It's a bad idea to allow php access files at the users descression. They then have access to everything php has excess to, which in some cases, everything. Maybe make an array, with all the possible options, so they cannot choose whatever they want.