How would I do this?

Discussion in 'Programming & Scripting' started by Dot, Dec 19, 2008 with 5 replies and 201 views.

  1. Dot

    Dot Premium Premium

    Messages:
    2,817
    Ratings:
    152
    I bought a reseller hosting account and I'm setting up my website.
    This is in HTML!


    How would I go about making a form that when completed it sends the form to my email address?


    Is there a script could automatically accept the form + payment from a customer, then create their shared hosting account, then email the information to them?

    If there is, What script is it?
     
  2. Madman340

    Madman340 Seasoned Member

    Messages:
    5,731
    Ratings:
    1,408
    Sounds like you're going to need to learn some MySQL and PHP to make it work right.
     
  3. mrwickedd

    mrwickedd Newbie

    Messages:
    89
    Ratings:
    7
    if your going to be selective about who you host etc you should just create a simple form that would ask for their name, desired domain/subdomain, username, password, and email, and once they click done it would just email it and you can set it up after that, and just set up a paypal account to which they can pay you at... this would be the best way to go about doing this, unless you plan on hosting 100+ then i suggest you just google website hosting scripts. you can also check with your webhost to see if they offer any services.

    how to create html/input forms:
    Code:
    http://www.w3schools.com/html/html_forms.asp
    how to create php forms:
    Code:
    http://www.isitebuild.com/simplephpform.htm
    (or just google forms for alternatives)
     
    • Like Like x 1
  4. OP
    Dot

    Dot Premium Premium

    Messages:
    2,817
    Ratings:
    152
    Sweet thanks, Im gonna try this right now.

    Yah you're right, I'm most likely not going to be able to get 100 customers anyways (even though i have the space) so I will just do this, especially since my email is linked with my phone so when i get a form sent to me I would know i need to get to a PC and do some work :biggrin:

    Ill let you know my results!

    Okay I got the form made and everything but I need to get it to email to my email address and I've tried with the .cgi (epic fail) and I've tried with the "mailto:" but all that does is open up Outlook for me.

    Anyone have experience with this?
     
  5. mrwickedd

    mrwickedd Newbie

    Messages:
    89
    Ratings:
    7
    what cgi script did you use? and can i see the html for your form.
     
  6. OP
    Dot

    Dot Premium Premium

    Messages:
    2,817
    Ratings:
    152
    I kinda like made a cgi script. I need a working one if you know of any.
    Here's my code for the Form:
    The Email stuff on the top don't work.
    HTML:
    <form 
    action= mailto:trentmc10@yahoo.com
    method="POST"
    enctype="multipart/form-data"
    name="EmailTestForm">
    
    Email Address:
    
    <input type="text" size="20" name="email">
    
    
    Package you would like(see images above):
    
    <select name="package">
    <option>Standard</option>
    <option>Advanced</option>
    <option>Premium</option>
    </select>
    
    
    First Name:
    
    <input type="text" size="20" name="firstname">
    
    
    Last Name:
    
    <input type="text" size="20" name="lastname">
    
    
    Address 1:
    
    <input type="text" size="30" name="address1">
    
    
    Address 2:
    
    <input type="text" size="30" name="address2">
    
    
    City:
    
    <input type="text" size="20" name="city">
    
    
    State:
    
    <select id="state" name="state">
    <option value="">Select One</option>
    <optgroup label="Canadian Provinces">
    <option value="AB">Alberta</option>
    <option value="BC">British Columbia</option>
    <option value="MB">Manitoba</option>
    <option value="NB">New Brunswick</option>
    <option value="NF">Newfoundland</option>
    <option value="NT">Northwest Territories</option>
    <option value="NS">Nova Scotia</option>
    <option value="NU">Nunavut</option>
    <option value="ON">Ontario</option>
    <option value="PE">Prince Edward Island</option>
    <option value="QC">Quebec</option>
    <option value="SK">Saskatchewan</option>
    <option value="YT">Yukon Territory</option>
    </optgroup>
    
    <optgroup label="U.S. States">
    <option value="AK">Alaska</option>
    <option value="AL">Alabama</option>
    <option value="AR">Arkansas</option>
    <option value="AZ">Arizona</option>
    <option value="CA">California</option>
    <option value="CO">Colorado</option>
    <option value="CT">Connecticut</option>
    <option value="DC">District of Columbia</option>
    <option value="DE">Delaware</option>
    <option value="FL">Florida</option>
    <option value="GA">Georgia</option>
    <option value="HI">Hawaii</option>
    <option value="IA">Iowa</option>
    <option value="ID">Idaho</option>
    <option value="IL">Illinois</option>
    <option value="IN">Indiana</option>
    <option value="KS">Kansas</option>
    <option value="KY">Kentucky</option>
    <option value="LA">Louisiana</option>
    <option value="MA">Massachusetts</option>
    <option value="MD">Maryland</option>
    <option value="ME">Maine</option>
    <option value="MI">Michigan</option>
    <option value="MN">Minnesota</option>
    <option value="MO">Missouri</option>
    <option value="MS">Mississippi</option>
    <option value="MT">Montana</option>
    <option value="NC">North Carolina</option>
    <option value="ND">North Dakota</option>
    <option value="NE">Nebraska</option>
    <option value="NH">New Hampshire</option>
    <option value="NJ">New Jersey</option>
    <option value="NM">New Mexico</option>
    <option value="NV">Nevada</option>
    <option value="NY">New York</option>
    <option value="OH">Ohio</option>
    <option value="OK">Oklahoma</option>
    <option value="OR">Oregon</option>
    <option value="PA">Pennsylvania</option>
    <option value="PR">Puerto Rico</option>
    <option value="RI">Rhode Island</option>
    <option value="SC">South Carolina</option>
    <option value="SD">South Dakota</option>
    <option value="TN">Tennessee</option>
    <option value="TX">Texas</option>
    <option value="UT">Utah</option>
    <option value="VA">Virginia</option>
    <option value="VT">Vermont</option>
    <option value="WA">Washington</option>
    <option value="WI">Wisconsin</option>
    <option value="WV">West Virginia</option>
    <option value="WY">Wyoming</option>
    </optgroup>
    </select>
    
    
    Zip Code:
    
    <input type="text" size="20" name="zipcode">
    
    
    Your Questions:
    
    <textarea name="questions" rows="4" cols="20">
    </textarea>
    
    
    
    
    <input type="submit" value="Send your Hosting Request">
    
    </form>
    Okay my server doesn't have a 'sendmail' so now what do I do?