March 13th, 2000, 04:36 PM
I am a developer wanting to make the transition from asp to php3 and would like some info from anyone who can help since the documentation is a little vague in some areas.
What I need is the equivalent of:
my_var = request.form("posted_var")
Which would turn the variable "my_var" into whatever the posted variable "posted_var" was.
This is done using the POST method and not GET.
Any help would be appreciated.
March 13th, 2000, 05:09 PM
Form entries are automatically placed into variables in the target php3 script. IOW, if you have the form element:
<form action=some.php3 method=post>
<input type=text name=name>
Than some.php3 would have the value entered in that element in the variable $name.
If you want the form elements in an array they will also be in the array $HTTP_POST_VARS (in this case $HTTP_POST_VARS[name]). Which, incidently, I convert to $hpv if I plan on using it, since $HTTP_POST_VARS can be a bit much to type
BTW, if you are interested, there is a program that converts ASP scripts to PHP called, you guessed it, asp2php. I don't have any links but you can do a search at www.phpbuilder.com for it and you should find it.
[This message has been edited by rod k (edited March 13, 2000).]
March 13th, 2000, 08:07 PM
$my_var = $posted_var;
is this all you wanted?