★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000723.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  ASP to PHP...Making the change

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   ASP to PHP...Making the change
joeyfishonly
Junior Member
posted March 13, 2000 02:36 PM     Click Here to See the Profile for joeyfishonly   Click Here to Email joeyfishonly     Edit/Delete Message Reply w/Quote
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.

Thanks

rod k
Member
posted March 13, 2000 03:09 PM     Click Here to See the Profile for rod k   Click Here to Email rod k     Edit/Delete Message Reply w/Quote
Form entries are automatically placed into variables in the target php3 script. IOW, if you have the form element:

<form action=/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum5%2FHTML%2Fsome.php3&y=1999 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).]

'tantrum
Member
posted March 13, 2000 06:07 PM     Click Here to See the Profile for 'tantrum   Click Here to Email 'tantrum     Edit/Delete Message Reply w/Quote
$my_var = $posted_var;

is this all you wanted?

Basil

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.