Storing Form text input in a variable in one file

  • Thread starter jakeatkins via WebmasterKB.com
  • Start date
J

jakeatkins via WebmasterKB.com

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!
 
A

Adrienne Boswell

Gazing into my crystal ball I observed "jakeatkins via WebmasterKB.com"
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top