Thread: PHP Order Form

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0

    PHP Order Form


    I am attempting to create an order form for my school's website that will allow users to pay through PayPal. While I have experience with HTML and CSS, PHP is not something that I have played with much. That being said, I found a PHP order form that looks like what I want. It allows the user to enter quantities of items to purchase and totals the amount for them.

    They have two examples on their website, one that sends the order to email and another that sends the total to PayPal. However, I need a form that will send the order details to an email AND one that allows for payment through PayPal.

    Does such a thing already exist somewhere? I mistakenly thought that this would be much simpler. I messed around with PrestaCart and Zen Cart, but they are both way too bulky for what I'm looking for, which is simply an order form.

    Thank you for your time and assistance!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7
    The e-mail is rather a simple item using PHP's mail() function.
    Example: http://email.about.com/od/emailprogr...PHP_Script.htm
    As for the payment, this seems an excellent tutorial:http://www.evoluted.net/thinktank/we...hp-integration
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Sending out the order details is something you would do as part of an IPN handler. After the user goes to the PayPal site and pays, you can write a script that will be notified by PayPal of the payment. That script can then handle your email sending.

    If you look up "IPN" you can find the details on the PayPal documentation.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0
    Thank you for the resources - I think that is just what I needed!

IMN logo majestic logo threadwatch logo seochat tools logo