Results 1 to 19 of 19
  1. #1
    Join Date
    Mar 2002
    Location
    Reading Pa
    Posts
    33

    order form needed

    I am in need of a order form script (php please) so i can sell my hosting packages. I use hostcharge for payment

    I like these

    mchost.com
    http://www.ariaswebhosting.com/accounts/order/\

    please help me.

  2. #2
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Why dont you have a look at my one and edit it to your needs?

    <?php
    if($tos == "No") {
    mail("[email protected]", "Client has declined TOS", "Client has declined TOS");
    header("Location: index.html"); exit;
    }

    if(isset($register)) {
    $ds = "Registering A Domain";
    }
    if(isset($existing)) {
    $ds = "Transfering Existing Domain";
    }

    if(isset($plan) && $order == "yes" && !empty($domain) && !empty($referral) && !empty($email) && strstr($email, "@")) {

    if($plan == "Lite") {
    $product = "26066";
    }
    if($plan == "Regular") {
    $product = "26068";
    }
    if($plan == "Business") {
    $product = "26069";
    }
    if($plan == "Enterprise") {
    $product = "26070";
    }

    mail("[email protected]", "New Order!", "The following info shows details about new client::\n\n
    - Email Address: $email\n\n
    - Domain Name: $domain\n\n
    - Domain Status: $domain_status\n\n
    - Plan: $plan\n\n
    - How they heard about us: $referral");

    header("Location: http://www.planetpos.com/order.asp?$product"); exit;
    }
    ?>
    <html>
    <head>
    <title>HostHeadQuarters:: Network</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0">

    <table border="0" cellspacing="0" cellpadding="0" width="780" align="left">
    <tr align="left" valign="top">
    <td bgcolor="#0080C0">
    <img src="images/logo.gif" border="0" width="276" height="70">
    </td>
    <td bgcolor="#0080C0">

    <table border="0" cellspacing="0" cellpadding="0" align="right">
    <tr>
    <td height="50">&nbsp;</td>
    </tr>

    <tr align="left" valign="bottom">
    <td>
    <a href="index.html"><img src="images/home.gif" border="0"></a><a href="hosting.html"><img src="images/hosting.gif" border="0"></a><a href="support.html"><img src="images/support.gif" border="0"></a><a href="network.html"><img src="images/network.gif" border="0"></a><a href="/forum"><img src="images/forum.gif" border="0"></a><a href="contact.html"><img src="images/contact.gif" border="0"></a></td>
    </tr>
    </table>

    </td>
    </tr>
    <tr align="left" valign="top">
    <td height="4" bgcolor="#006A9F" colspan="2">

    </td>
    </tr>
    <tr align="left" valign="top">
    <td colspan="2">

    <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left">
    <tr align="left" valign="top">
    <td width="60" bgcolor="#BCE2FF">

    </td>
    <td bgcolor="#ffffff">

    <table border="0" cellspacing="0" cellpadding="2" width="550" align="center">
    <tr align="left" valign="top">
    <td colspan="2"><br>
    <font size="4"><b>Order Form.</b></font>
    </td>
    </tr>

    <tr align="left" valign="top">
    <td colspan="2"><br>

    <?php

    if(empty($plan)) {
    $error = "Error! You need to first select a plan. Please go back";
    }
    else {
    print "<ol>";
    print "Plan Name: <b>$plan</b>";
    ?>

    <form action="order.php" method="POST">
    <input type="hidden" name="plan" value="<?=$plan?>">
    <input type="hidden" name="order" value="yes">

    E-mail Address:
    <input type="text" name="email"><br><br>

    Domain Name:
    <input type="text" name="domain"><br><br>

    Domain Status:
    <select name="domain_status">
    <option>Register New Domain</option>
    <option>Transfer Existing Domain</option>
    </select>

    <br><br>

    Agree to <a href="tos.html">TOS?</a>
    <select name="tos">
    <option>Yes</option>
    <option>No</option>
    </select>

    <br><br>

    How did you hear about us?
    <input type="text" name="referral"><br><br>

    <input type="submit" value="Order Now!" name="Submit">
    </form>

    <?php
    print "</ol>";
    }

    if($order == "yes") {
    if(empty($domain) || empty($referral) || empty($email)) {
    $error = "All fields are required. Please correct the error";
    }
    }

    print "<font color=\"red\"><b>$error</b></font>";
    ?>

    </td>
    </tr>

    <tr align="left" valign="top">
    <td colspan="2"><br><br>
    <center>
    <a href="index.html">Home</a> :: <a href="hosting.html">Hosting Plans</a> :: <a href="support.html">Support</a>
    :: <a href="network.html">Network</a> :: <a href="forum.html">Forum</a> :: <a href="contact.html">Contact</a>
    </center><br>
    <center><b>
    Copyright &copy; 2002 HostHeadQuarters. All rights reserved.<br>
    :: <a href="tos.html"><small>Terms Of Service</small></a>
    </b></center>
    <br></td>
    </tr>
    </table>


    </td>
    <td width="60" bgcolor="#BCE2FF">

    </td>
    </tr>
    </table>

    </td>
    </tr>
    <tr align="left" valign="top">
    <td height="5" bgcolor="#006A9F" colspan="2">

    </td>
    </tr>
    </table>

    </body>
    </html>
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  3. #3
    Join Date
    Sep 2002
    Location
    Jakarta
    Posts
    1,585
    How kind of you to share that syntax
    Hostime Managed Hosting
    Opening the bridge between your business and the world.
    http://www.hostime.com

  4. #4
    Nice to know they are still some decent people out there.

    Cheers.

  5. #5
    Join Date
    Jul 2002
    Location
    India
    Posts
    350
    Originally posted by mulligan
    Nice to know they are still some decent people out there.

    Cheers.
    agree very much !!! I was also giving up hope (sort of) ... when i stubled upon this .. now to try it out for myself .

    thanx very much dude , neway
    http://www.featuredhost.com | mailto: [email protected] | ASP.NET-MS SQL-Cold Fusion hosting| Cheap domain registration | MSN : [email protected] |

  6. #6
    Join Date
    Sep 2002
    Location
    Sweden
    Posts
    98
    Originally posted by Marts
    Why dont you have a look at my one and edit it to your needs?

    <?php
    if($tos == "No") {
    mail("[email protected]", "Client has declined TOS", "Client has declined TOS");
    header("Location: index.html"); exit;
    }

    if(isset($register)) {
    $ds = "Registering A Domain";
    }
    if(isset($existing)) {
    $ds = "Transfering Existing Domain";
    }

    if(isset($plan) && $order == "yes" && !empty($domain) && !empty($referral) && !empty($email) && strstr($email, "@")) {

    if($plan == "Lite") {
    $product = "26066";
    }
    if($plan == "Regular") {
    $product = "26068";
    }
    if($plan == "Business") {
    $product = "26069";
    }
    if($plan == "Enterprise") {
    $product = "26070";
    }

    mail("[email protected]", "New Order!", "The following info shows details about new client::\n\n
    - Email Address: $email\n\n
    - Domain Name: $domain\n\n
    - Domain Status: $domain_status\n\n
    - Plan: $plan\n\n
    - How they heard about us: $referral");

    header("Location: http://www.planetpos.com/order.asp?$product"); exit;
    }
    ?>
    <html>
    <head>
    <title>HostHeadQuarters:: Network</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0">

    <table border="0" cellspacing="0" cellpadding="0" width="780" align="left">
    <tr align="left" valign="top">
    <td bgcolor="#0080C0">
    <img src="images/logo.gif" border="0" width="276" height="70">
    </td>
    <td bgcolor="#0080C0">

    <table border="0" cellspacing="0" cellpadding="0" align="right">
    <tr>
    <td height="50">&nbsp;</td>
    </tr>

    <tr align="left" valign="bottom">
    <td>
    <a href="index.html"><img src="images/home.gif" border="0"></a><a href="hosting.html"><img src="images/hosting.gif" border="0"></a><a href="support.html"><img src="images/support.gif" border="0"></a><a href="network.html"><img src="images/network.gif" border="0"></a><a href="/forum"><img src="images/forum.gif" border="0"></a><a href="contact.html"><img src="images/contact.gif" border="0"></a></td>
    </tr>
    </table>

    </td>
    </tr>
    <tr align="left" valign="top">
    <td height="4" bgcolor="#006A9F" colspan="2">

    </td>
    </tr>
    <tr align="left" valign="top">
    <td colspan="2">

    <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left">
    <tr align="left" valign="top">
    <td width="60" bgcolor="#BCE2FF">

    </td>
    <td bgcolor="#ffffff">

    <table border="0" cellspacing="0" cellpadding="2" width="550" align="center">
    <tr align="left" valign="top">
    <td colspan="2"><br>
    <font size="4"><b>Order Form.</b></font>
    </td>
    </tr>

    <tr align="left" valign="top">
    <td colspan="2"><br>

    <?php

    if(empty($plan)) {
    $error = "Error! You need to first select a plan. Please go back";
    }
    else {
    print "<ol>";
    print "Plan Name: <b>$plan</b>";
    ?>

    <form action="order.php" method="POST">
    <input type="hidden" name="plan" value="<?=$plan?>">
    <input type="hidden" name="order" value="yes">

    E-mail Address:
    <input type="text" name="email"><br><br>

    Domain Name:
    <input type="text" name="domain"><br><br>

    Domain Status:
    <select name="domain_status">
    <option>Register New Domain</option>
    <option>Transfer Existing Domain</option>
    </select>

    <br><br>

    Agree to <a href="tos.html">TOS?</a>
    <select name="tos">
    <option>Yes</option>
    <option>No</option>
    </select>

    <br><br>

    How did you hear about us?
    <input type="text" name="referral"><br><br>

    <input type="submit" value="Order Now!" name="Submit">
    </form>

    <?php
    print "</ol>";
    }

    if($order == "yes") {
    if(empty($domain) || empty($referral) || empty($email)) {
    $error = "All fields are required. Please correct the error";
    }
    }

    print "<font color=\"red\"><b>$error</b></font>";
    ?>

    </td>
    </tr>

    <tr align="left" valign="top">
    <td colspan="2"><br><br>
    <center>
    <a href="index.html">Home</a> :: <a href="hosting.html">Hosting Plans</a> :: <a href="support.html">Support</a>
    :: <a href="network.html">Network</a> :: <a href="forum.html">Forum</a> :: <a href="contact.html">Contact</a>
    </center><br>
    <center><b>
    Copyright &copy; 2002 HostHeadQuarters. All rights reserved.<br>
    :: <a href="tos.html"><small>Terms Of Service</small></a>
    </b></center>
    <br></td>
    </tr>
    </table>


    </td>
    <td width="60" bgcolor="#BCE2FF">

    </td>
    </tr>
    </table>

    </td>
    </tr>
    <tr align="left" valign="top">
    <td height="5" bgcolor="#006A9F" colspan="2">

    </td>
    </tr>
    </table>

    </body>
    </html>

    Bless you.

  7. #7
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Any time guys .... glad to be able to help!!

    I hope to see this form around from time to time. Fairly easy form, but does the job very well. I also have one that incorporates 2checkout so let me know!

    Thanks for all your kind words!
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  8. #8
    blowing smoke @ you Marts
    www.SURRENDERONLINE.com.au
    Perfect Solutions Every Time! Sydney Based :: Dedicated Servers :: Colocation :: Superior Support::Reseller Solutions

  9. #9
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Originally posted by Choppy
    blowing smoke @ you Marts
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  10. #10
    www.SURRENDERONLINE.com.au
    Perfect Solutions Every Time! Sydney Based :: Dedicated Servers :: Colocation :: Superior Support::Reseller Solutions

  11. #11
    Join Date
    May 2001
    Posts
    83
    That was nice of you to post that. I'm interested in a 2checkout example if you'd PM or post it.

  12. #12
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Ok here is a 2checkout based one!

    Not to different but very helpfull if you cant work it out!

    <?php

    if($tos == "No") {

    mail("[email protected]", "Client has declined TOS", "Client has declined TOS");

    header("Location: index.html"); exit;

    }



    if(isset($register)) {

    $ds = "Registering A Domain";

    }

    if(isset($existing)) {

    $ds = "Transfering Existing Domain";

    }



    if(isset($plan) && $order == "yes" && !empty($domain) && !empty($referral) && !empty($email) && strstr($email, "@")) {


    if($plan == "Lite-Windows") {

    $product = "&product_id=9";

    }

    if($plan == "Regular-Windows") {

    $product = "&product_id=10";

    }


    if($plan == "Business-Windows") {

    $product = "&product_id=11";

    }

    if($plan == "Enterprise-Windows") {

    $product = "&product_id=13";

    }

    if($plan == "Lite") {

    $product = "&product_id=3";

    }

    if($plan == "Regular") {

    $product = "&product_id=5";

    }

    if($plan == "Business") {

    $product = "&product_id=6";

    }

    if($plan == "Enterprise") {

    $product = "&product_id=8";

    }



    mail("[email protected]", "New Order!", "The following info shows details about new client::\n\n

    - Email Address: $email\n\n

    - Domain Name: $domain\n\n

    - Domain Status: $domain_status\n\n

    - Plan: $plan\n\n

    - How they heard about us: $referral");



    header("Location: https://www.2checkout.com/cgi-bin/cr...hant_order_id=$product"); exit;

    }

    ?>



    <?php



    if(empty($plan)) {

    $error = "Error! You need to first select a plan. Please go back";

    }

    else {

    print "<ol>";

    print "Plan Name: <b>$plan</b>";

    ?>



    <form action="order.php" method="POST">

    <input type="hidden" name="plan" value="<?=$plan?>">

    <input type="hidden" name="order" value="yes">



    E-mail Address:

    <input type="text" name="email"><br><br>



    Domain Name:

    <input type="text" name="domain"><br><br>



    Domain Status:

    <select name="domain_status">

    <option>Register New Domain</option>

    <option>Transfer Existing Domain</option>

    </select>



    <br><br>



    Agree to <a href="tos.html">TOS?</a>

    <select name="tos">

    <option>Yes</option>

    <option>No</option>

    </select>



    <br><br>



    How did you hear about us?

    <input type="text" name="referral"><br><br>



    <input type="submit" value="Order Now!" name="Submit">

    * Please note Credit Card will be charged in USD but will be converted so you pay the AUD amount.

    </form>



    <?php

    print "</ol>";

    }



    if($order == "yes") {

    if(empty($domain) || empty($referral) || empty($email)) {

    $error = "All fields are required. Please correct the error";

    }

    }



    print "<font color=\"red\"><b>$error</b></font>";

    ?>

    Have a great day
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  13. #13
    Join Date
    May 2001
    Posts
    83
    Thank you.

  14. #14
    Join Date
    Jul 2002
    Posts
    541
    You have to admit, PHP is beautiful in its simplicity. Nice work sharing the code too.

    -Wc-

  15. #15
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Any time guys!
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  16. #16
    Join Date
    May 2002
    Location
    Toronto
    Posts
    53
    Nice script, thanks for posting.

    Would anyone happen to know how to make it so that if someone enters an invalid e-mail/domain name an error message will show up? (Right now it just resets).

  17. #17
    Join Date
    Nov 2001
    Location
    Australia Sydney
    Posts
    439
    Yep easy enough just to add another line!!

    let me work it out

    back in a sec!
    HostHeadQuarters.com
    Reliable Hosting
    Great Support

  18. #18
    Join Date
    Jun 2002
    Location
    Toronto, Ontario
    Posts
    1,449
    It seems as though it doesn't work for me!
    Kaumil P.

  19. #19
    Join Date
    Jun 2002
    Location
    Toronto, Ontario
    Posts
    1,449
    Nevermind, got it to work
    Kaumil P.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •