Storing Form text input in a variable in one file

Storing Form text input in a variable in one file

am 14.09.2007 21:40:06 von jakeatkins

Is it possible to have a user enter an amount into a textbox and then store
that in a variable, all within one .php file? I'm trying to set up an online
donation form that needs the amount entered before being sent to the payment
processor form.

Thanks for the help!

--
Message posted via http://www.webmasterkb.com

Re: Storing Form text input in a variable in one file

am 16.09.2007 07:29:55 von Adrienne Boswell

Gazing into my crystal ball I observed "jakeatkins via WebmasterKB.com"
writing in news:783813f4407df@uwe:

> Is it possible to have a user enter an amount into a textbox and then
> store that in a variable, all within one .php file? I'm trying to set
> up an online donation form that needs the amount entered before being
> sent to the payment processor form.
>
> Thanks for the help!
>

You're going to need a lot more than the amount. You will need the
person's name, address, card number, expiration, etc. All that
information is in the FORM or QUERYSTRING (depending if the request was
GET or POST) object, a string of name/value pairs. It looks something
like: firstname=John&lastname=Doe&address=123 Any
Street&city=Glendale&state=CA&zip=91205&card=123456789012345 &expmonth=9
&expyear=2006.

You will probably want to have the form post to itself, validate the
results serverside, then send them to the gateway in whatever form the
gateway is expecting.

I would suggest first reading up on form processing in PHP, and then
reading the SDK for the gateway you are going to use.


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share