Advanced Search

Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 45

Thread: Help creating order form

  1. #31
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Will I have to do an 'isset' thing for each of the checkboxes? That part kind of confused me, because I can see how that relates to the logo design part, but I didn't see anything for the other services. I'm assuming if something is needed for each of the checkboxes then we'll work on those later? I guess I don't know...
    Yes, you need to have one for each of the checkboxes.

    For a second checkbox, you'll add something like this:
    Code:
    if (isset($_POST['services2'])) {
    	$variable1 = $_POST['field_name_1'];
    	$variable2 = $_POST['field_name_2'];
    }
    If there are common elements in all of the forms, then you can just add them outside the if statements -- just like name, mailing address, email etc...

    I understood and did this part too - changed all the 'id' attributes to 'name', and called them all something different. Do you need to see my script again so you know what I changed them to?
    No, not if you understand the relationship these have to the PHP script.

    slightly confused here - is this part of the code needed for the actual site, or is it just to test it until I get it published or something? (forgive my ignorance)
    It's just to test it. In the final script, you'll be emailing and saving to a database. Until that's set up, this gives you a visual cue that everything is working. It's best to get everything outputting correctly and then add the email part (otherwise, you get 1000 emails for nothing).

    By the way, not sure if you realize this or not, the email won't be functional until you get a proper server. WAMP isn't a mail server.

    And um.... I really have no idea what the rest of what you said means. (XHTML Transitional, XHTML, DTD, HTML DTD... all of that.) Could you explain them please? Thanks.
    Give this a read. It'll probably do a better job of explaining it than I could. My point though was that you're using a XHTML declaration at the top of your document. This says to the browser that you're using XHTML, which you're not. You should be using a HTML DTD, as listed on the article I linked to. Also, XHTML isn't fully supported by IE as yet.


    Build out the rest of your PHP script with the if statements, and post what you have. We'll go from there.

  2. #32
    Join Date
    Feb 2008
    Location
    Not telling! (sorry...)
    Posts
    48
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    It's just to test it. In the final script, you'll be emailing and saving to a database. Until that's set up, this gives you a visual cue that everything is working. It's best to get everything outputting correctly and then add the email part (otherwise, you get 1000 emails for nothing).

    By the way, not sure if you realize this or not, the email won't be functional until you get a proper server. WAMP isn't a mail server.

    Build out the rest of your PHP script with the if statements, and post what you have. We'll go from there.
    oh okay... um... will I need to fill out the code for it to do the test or does it do it on its own?

    And yes, I did know that - about needed a real server for the email function to work.

    I think I'm done with the php 'if' statements, but I'm not sure if I did the drop-down menus correctly...

    here's the php script:
    Code:
    <?php
    
    $name = $_POST['name'];
    $email = $_POST['emailaddress'];
    $address = $_POST['mailingaddress'];
    
    if (isset($_POST['services_logo'])) 
    {
    	$company_name = $_POST['comanyname'];
    	$company_description = $_POST['companydescription'];
    }
    
    if (isset($_POST['services_businesscard'])) 
    {
    	$variable1 = $_POST['company_name'];
    	$variable2 = $_POST['companycontact'];
    }
    
    if (isset($_POST['services_webgraphic'])) 
    {
    	$variable1 = $_POST['forumname'];
    	$variable2 = $_POST['sig/avatar_description'];
    }
    
    if (isset($_POST['services_flyer'])) 
    {
    	$variable1 = $_POST['whatevent'];
    	$variable2 = $_POST['whatfor'];
    	$variable3 = $_POST['whofor'];
    	$variable4 = $_POST['otherinfo'];
    }
    
    if (isset($_POST['services_notecard'])) 
    {
    	$variable1 = $_POST['selectedartwork'];
    	$variable2 = $_POST['y/n'];
    }
    
    if (isset($_POST['services_buyartwork'])) 
    {
    	$variable1 = $_POST['artworkname'];
    }
    
    if (isset($_POST['services_other'])) 
    {
    	$variable1 = $_POST['otherservice'];
    	$variable2 = $_POST['description'];
    }
    
    
    /* TESTING OUTPUT */
    echo $name . "<br>";
    echo $email . "<br>";
    echo $address . "<br>";
    echo $company_name . "<br>";
    
    ?>

    and here's the script of the checkboxes and all the textboxes and stuff that go with them:
    Code:
    <p>
    <label for="services">Services:</label>
    <input type="checkbox" name="services_logo" value="logo_design" onClick="toggle_visibility(this.value)" /> Logo Design<br />
    <input type="checkbox" name="services_businesscard" value="business_card" class="threepxfix" onClick="toggle_visibility(this.value)" /> Business Card Design <br />
    <input type="checkbox" name="services_webgraphic" value="web_graphics" class="threepxfix" onClick="toggle_visibility(this.value)" /> Web Graphics <br />
    <input type="checkbox" name="services_flyer" value="flyers" class="threepxfix" onClick="toggle_visibility(this.value)" /> Flyers/Handouts <br />
    <input type="checkbox" name="services_notecard" value="notecards" class="threepxfix" onClick="toggle_visibility(this.value)" /> Notecards <br />
    <input type="checkbox" name="services_buyartwork" value="Buying_Artwork" class="threepxfix"
    onClick="toggle_visibility(this.value)" /> Artwork for Sale<br />
    <input type="checkbox" name="services_other" value="other" class="threepxfix" onClick="toggle_visibility(this.value)"	/> Other <br />
    </p>
    
    <p id="logo_design" class="hidden">
    <label for="services">Logo Design:</label>
     <br>Company Name: <br> <input type="text" name="companyname" /><br>
    <br>Business Description: <br><textarea name="companydescription"></textarea>
    </p>
    
    <p id="business_card" class="hidden">
    <label for="services">Business Card Design:</label>
    <br><br>If you have a logo and want it used on your card, we will need a copy of it. If you do not have a logo but want one, please fill out the information for Logo Design as well.<br>
    <br>Company Name:<br><input type="text" name="company_name" /><br>
    <br>Company Contact:<br><textarea name="companycontact">(Employee/Manager) Name:
    Phone #:
    Fax # (if applicable):
    (company) Email address:
    Anything else you want on the card:</textarea>
    </p>
    
    <p id="web_graphics" class="hidden">
    <label for="services">Web Graphics:</label>
    <br>
    Again, this section is mainly intended for forum signatures/ avatars. If you have something else in mind, please fill out the 'web graphic' option under the 'other' section.<br>
    <br>Forum Display Name:<br><input type="text" name="forumname" /><br>
    <br>Please either describe a basic outline of what you want, or give us something to base the image off of:<br><textarea name="sig/avatar_description"></textarea>
    </p>
    
    <p id="flyers" class="hidden">
    <label for="services">Flyers/Handouts:</label>
    <br>What is the event?<br><input type="text" name="whatevent" />
    <br>What is it for?<br><input type="text" name="whatfor" />
    <br>Who is it for?<br><input type="text" name="whofor" />
    <br>Give any other needed information:
    <br>(date, time, location, etc...)<br><textarea name="otherinfo"></textarea>
    </p>
    
    <p id="notecards" class="hidden">
    <label for="services">Notecards:</label>
    <br>Name(s) of artwork to be included:<br>(3 Max, please.)<br>
    <textarea name="selectedartwork">1)
    2)
    3)
    </textarea><br>
    <br>If you want a custom image, please fill out the 'custom image' option under the 'other' section, and describe what you want. Alyssa or Theresia will do their best to complete what you describe.<br>
    <br>Do you wish to buy the artwork with the notecards?<br>
    <select name="y/n">
     <option value="1">~please select~</option>
     <option value="2">Yes</option>
     <option value="3">No</option>
    </select>
    </p>
    
    <p id="Buying_Artwork" class="hidden">
    <label for="services">Artwork for Sale:</label>
    <br>Name(s) of artwork you wish to buy:
    <br><textarea name="artworkname"></textarea><br>
    <br>If you want something specific drawn to buy, fill out the 'custom image' option under the 'other' section.
    </p>
    
    <p id="other" class="hidden">
    <label for="services">Other:</label>
    <br>What do you need?<br>
    <select name="otherservice">
     <option value="1">~select one~</option>
     <option value="2">Custom Image</option>
     <option value="3">Web Graphic</option>
     <option value="4">Other Service</option>
    </select><br>
    <br>Please Describe:
    <br><textarea name="description"></textarea>
    </p>
    if you need anything else from either script, let me know and I'll post it........

  3. #33
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    oh okay... um... will I need to fill out the code for it to do the test or does it do it on its own?
    No, you have specify what you want to echo out.

    Change testing part to this:
    Code:
    /* TESTING OUTPUT */
    echo $name . "<br>";
    echo $email . "<br>";
    echo $address . "<br>";
    echo $company_name . "<br>";
    echo $company_description . "<br>";
    echo $variable1 . "<br>";
    echo $variable2 . "<br>";
    echo $variable3 . "<br>";
    echo $variable4 . "<br>";
    A few other things you need to change before we can move on:

    1. Don't use "/" in the filed names. Use underscores, instead
    2. Use unique variable names. If someone is interested in two services, you won't get all the results because the repetitive variables will overwrite the first.

    To test use the echo statements, using the same syntax as above. You'll need to create a new line for each variable. Fill out the ENTIRE form (all services), hit submit and make sure that all the files are outputting correctly. If you're not getting some fields to work, post your PHP and HTML, and we'll go from there.

  4. #34
    Join Date
    Feb 2008
    Location
    Not telling! (sorry...)
    Posts
    48
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    A few other things you need to change before we can move on:

    1. Don't use "/" in the filed names. Use underscores, instead
    2. Use unique variable names. If someone is interested in two services, you won't get all the results because the repetitive variables will overwrite the first.
    um.... I fixed the 2nd one, but I'm confused about the first... can you explain that a little bit more? Like... where do you see that I used "/" where I shouldn't have?

  5. #35
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by Twilightrose917 View Post
    um.... I fixed the 2nd one, but I'm confused about the first... can you explain that a little bit more? Like... where do you see that I used "/" where I shouldn't have?
    Code:
    <?php
    
    $name = $_POST['name'];
    $email = $_POST['emailaddress'];
    $address = $_POST['mailingaddress'];
    
    if (isset($_POST['services_logo'])) 
    {
    	$company_name = $_POST['comanyname'];
    	$company_description = $_POST['companydescription'];
    }
    
    if (isset($_POST['services_businesscard'])) 
    {
    	$variable1 = $_POST['company_name'];
    	$variable2 = $_POST['companycontact'];
    }
    
    if (isset($_POST['services_webgraphic'])) 
    {
    	$variable1 = $_POST['forumname'];
    	$variable2 = $_POST['sig/avatar_description'];
    }
    
    if (isset($_POST['services_flyer'])) 
    {
    	$variable1 = $_POST['whatevent'];
    	$variable2 = $_POST['whatfor'];
    	$variable3 = $_POST['whofor'];
    	$variable4 = $_POST['otherinfo'];
    }
    
    if (isset($_POST['services_notecard'])) 
    {
    	$variable1 = $_POST['selectedartwork'];
    	$variable2 = $_POST['y/n'];
    }
    
    if (isset($_POST['services_buyartwork'])) 
    {
    	$variable1 = $_POST['artworkname'];
    }
    
    if (isset($_POST['services_other'])) 
    {
    	$variable1 = $_POST['otherservice'];
    	$variable2 = $_POST['description'];
    }
    
    
    /* TESTING OUTPUT */
    echo $name . "<br>";
    echo $email . "<br>";
    echo $address . "<br>";
    echo $company_name . "<br>";
    
    ?>
    The highlighted above and the cooresponding HTML field names

  6. The Following User Says Thank You to Medyman For This Useful Post:

    Twilightrose917 (05-23-2008)

  7. #36
    Join Date
    Feb 2008
    Location
    Not telling! (sorry...)
    Posts
    48
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    thanks - I totally skipped over those when I was looking at it. But I tried it out in WAMP, and either I'm not using it (wamp) correctly or I messed up somewhere in the code. Only 'email address' and 'mailing address' work...

    here's the php:
    Code:
    <?php
    
    $name = $_POST['name'];
    
    $email = $_POST['emailaddress'];
    
    $address = $_POST['mailingaddress'];
    
    if (isset($_POST['services_logo'])) 
    
    {
    	
    	$company_name = $_POST['comanyname'];
    	
    	$company_description = 
    
    $_POST['companydescription'];
    
    }
    
    if (isset($_POST['services_businesscard'])) 
    
    {
    	
    	$variable1 = $_POST['bcardcompanyname'];
    
    	$variable2 = $_POST['companycontact'];
    
    }
    
    if (isset($_POST['services_webgraphic'])) 
    
    {
    
    	$variable1 = $_POST['forumname'];
    
    	$variable2 = 
    
    $_POST['sig_avatar_description'];
    
    }
    
    if (isset($_POST['services_flyer'])) 
    
    {
    	$variable1 = $_POST['whatevent'];
    	$variable2 = $_POST['whatfor'];
    	$variable3 = $_POST['whofor'];
    
    	$variable4 = $_POST['otherinfo'];
    
    }
    
    if (isset($_POST['services_notecard'])) 
    
    {
    	$variable1 = $_POST['selectedartwork'];
    
    	$variable2 = $_POST['y_n'];
    
    }
    
    
    if (isset($_POST['services_buyartwork'])) 
    
    {
    	$variable1 = $_POST['artworkname'];
    
    }
    
    
    if (isset($_POST['services_other'])) 
    
    {
    	$variable1 = $_POST['otherservice'];
    
    	$variable2 = $_POST['description'];
    
    }
    
    
    /* TESTING OUTPUT */
    echo $name . "<br>";
    echo $email . "<br>";
    echo $address . "<br>";
    echo $companyname . "<br>";
    echo $companydescription . "<br>";
    echo $bcardcompanyname . "<br>";
    echo $companycontact . "<br>";
    echo $forumname . "<br>";
    echo $sig_avatar_description . "<br>";
    echo $whatevent . "<br>";
    echo $whatfor . "<br>";
    echo $whofor . "<br>";
    echo $otherinfo . "<br>";
    echo $selectedartwork . "<br>";
    echo $y_n . "<br>";
    echo $artworkname . "<br>";
    echo $otherservice . "<br>";
    echo $description . "<br>";
    and here's the html (for the whole page):
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html 
    
    xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <title>Ordering</title>
    
    <script type="text/javascript">
    <!--
        function toggle_visibility(id) {
           var e = document.getElementById(id);
           if(e.style.display == 'block')
              e.style.display = 'none';
           else
              e.style.display = 'block';
        }
    //-->
    </script>
    <style type="text/css">
    
    <!--
    body,td,th {
    	font-family: Papyrus;
    	font-size: 16pt;
    	color: 
    
    #FFFFFF;
    }
    body {
    	background-color: #000000;
    }
    a {
    	font-size: 14pt;
    	
    
    color: #FF0000;
    }
    a:link {
    	text-decoration: underline;
    }
    a:visited {
    	
    
    text-decoration: underline;
    	color: #0099FF;
    }
    a:hover {
    	text-decoration: 
    
    none;
    }
    a:active {
    	text-decoration: underline;
    }
    .style1 {color: #FF0000}
    .style2 {color: #3300CC}
    -->
    
    .cssform p{
    width: 550px;
    clear: left;
    margin: 0;
    padding: 5px 0 8px 0;
    padding-left: 155px; /*width of left column containing the label elements*/
    border-top: 1px dashed #990000;
    height: 1%;
    }
    
    .cssform label{
    font-weight: bold;
    float: left;
    margin-left: -155px; /*width of left column*/
    width: 150px; /*width of labels. Should be smaller than left column (155px) to create 
    
    some right margin*/
    }
    
    .cssform input[type="text"]{ /*width of text boxes. IE6 does not understand this 
    
    attribute*/
    width: 180px;
    }
    
    .cssform textarea{
    width: 250px;
    height: 95px;
    }
    
    .hidden {
    	display:none;
    }
    
    /*.threepxfix class below:
    Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents.
    to account for 3 pixel bug: 
    
    http://www.positioniseverything.net/explorer/threepxtest.html
    */
    
    * html .threepxfix{
    margin-left: 3px;
    }
    </style>
    
    </head>
    
    
    <body>
    
    <table width="750" border="1" cellspacing="2" cellpadding="1" align="center">
    
      <tr>
        
    <td width="85"><div align="center"><a href="index.html">Home</a></div></td>
        
    <td width="136"><div align="center"><a href="about us.html">About Us</a></div></td>
    
    <td width="247"><div align="center"><a href="our services.html">Available 
    
    Services</a></div></td>
        
    <td width="117"><div align="center"><a href="artwork.html">Artwork</a></div></td>
        
    <td width="131"><div align="center"><a href="ordering.html">Ordering</a></div></td>
      
    </tr>
    
    </table>
    
    <br><br>
    <h1><p align="center"><font color="FF0000">Order Form</font></p></h1>
    <br>
    
    <form id="myform" class="cssform" action="order.php" method="POST">
    
    <p>
    <label for="user">Name</label>
    <input type="text" name="user" value="" />
    </p>
    
    <p>
    <label for="emailaddress">Email Address:</label>
    <input type="text" name="emailaddress" value="" />
    </p>
    
    <p>
    <label for="comments">Mailing Address:</label>
    <textarea name="mailingaddress" rows="5" cols="25"></textarea>
    </p>
    
    
    <p>
    <label for="services">Services:</label>
    <input type="checkbox" name="services_logo" value="logo_design" 
    
    onClick="toggle_visibility(this.value)" /> Logo Design<br />
    <input type="checkbox" name="services_businesscard" value="business_card" 
    
    class="threepxfix" onClick="toggle_visibility(this.value)" /> Business Card Design 
    
    <br />
    <input type="checkbox" name="services_webgraphic" value="web_graphics" 
    
    class="threepxfix" onClick="toggle_visibility(this.value)" /> Web Graphics <br />
    <input type="checkbox" name="services_flyer" value="flyers" class="threepxfix" 
    
    onClick="toggle_visibility(this.value)" /> Flyers/Handouts <br />
    <input type="checkbox" name="services_notecard" value="notecards" class="threepxfix" 
    
    onClick="toggle_visibility(this.value)" /> Notecards <br />
    <input type="checkbox" name="services_buyartwork" value="Buying_Artwork" 
    
    class="threepxfix"
    onClick="toggle_visibility(this.value)" /> Artwork for Sale<br />
    <input type="checkbox" name="services_other" value="other" class="threepxfix" 
    
    onClick="toggle_visibility(this.value)"	/> Other <br />
    </p>
    
    <p id="logo_design" class="hidden">
    <label for="services">Logo Design:</label>
     <br>Company Name: <br> <input type="text" name="companyname" /><br>
    <br>Business Description: <br><textarea name="companydescription"></textarea>
    </p>
    
    <p id="business_card" class="hidden">
    <label for="services">Business Card Design:</label>
    <br><br>If you have a logo and want it used on your card, we will need a copy of it. 
    
    If you do not have a logo but want one, please fill out the information for Logo 
    
    Design as well.<br>
    <br>Company Name:<br><input type="text" name="bcardcompanyname" /><br>
    <br>Company Contact:<br><textarea name="companycontact">(Employee/Manager) Name:
    Phone #:
    Fax # (if applicable):
    (company) Email address:
    Anything else you want on the card:</textarea>
    </p>
    
    <p id="web_graphics" class="hidden">
    <label for="services">Web Graphics:</label>
    <br>
    Again, this section is mainly intended for forum signatures/ avatars. If you have 
    
    something else in mind, please fill out the 'web graphic' option under the 'other' 
    
    section.<br>
    <br>Forum Display Name:<br><input type="text" name="forumname" /><br>
    <br>Please either describe a basic outline of what you want, or give us something to 
    
    base the image off of:<br><textarea name="sig_avatar_description"></textarea>
    </p>
    
    <p id="flyers" class="hidden">
    <label for="services">Flyers/Handouts:</label>
    <br>What is the event?<br><input type="text" name="whatevent" />
    <br>What is it for?<br><input type="text" name="whatfor" />
    <br>Who is it for?<br><input type="text" name="whofor" />
    <br>Give any other needed information:
    <br>(date, time, location, etc...)<br><textarea name="otherinfo"></textarea>
    </p>
    
    <p id="notecards" class="hidden">
    <label for="services">Notecards:</label>
    <br>Name(s) of artwork to be included:<br>(3 Max, please.)<br>
    <textarea name="selectedartwork">1)
    2)
    3)
    </textarea><br>
    <br>If you want a custom image, please fill out the 'custom image' option under the 
    
    'other' section, and describe what you want. Alyssa or Theresia will do their best to 
    
    complete what you describe.<br>
    <br>Do you wish to buy the artwork with the notecards?<br>
    <select name="y_n">
     <option value="1">~please select~</option>
     <option value="2">Yes</option>
     <option value="3">No</option>
    </select>
    </p>
    
    <p id="Buying_Artwork" class="hidden">
    <label for ="services">Artwork for Sale:</label>
    <br>Name(s) of artwork you wish to buy:
    <br><textarea name="artworkname"></textarea><br>
    <br>If you want something specific drawn to buy, fill out the 'custom image' option 
    
    under the 'other' section.
    </p>
    
    <p id="other" class="hidden">
    <label for="services">Other:</label>
    <br>What do you need?<br>
    <select name="otherservice">
     <option value="1">~select one~</option>
     <option value="2">Custom Image</option>
     <option value="3">Web Graphic</option>
     <option value="4">Other Service</option>
    </select><br>
    <br>Please Describe:
    <br><textarea name="description"></textarea>
    </p>
    
    <br>
    <div style="margin-left: 150px;">
    <input type="submit" value="Submit" /> <input type="reset" value="Reset" />
    </div>
    
    <br>
    
    </form>
    </body>
    </html>
    I don't think I quite know what I'm doing with WAMP...

  8. #37
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    The fact that you're getting the two variables to work out correctly suggests that you have WAMP set up correctly.

    Your "name" field isn't working because in your HTML you have this:
    Code:
    <input type="text" name="user" value="" />
    and in your PHP, you have this:
    Code:
    $name = $_POST['name'];
    They need to be the same. So change both to 'name' or 'user'. And that field will work


    Company Name & Description aren't working because of the following:

    There is a typo: $company_name = $_POST['companyname'];

    Also, the variables in the echo statements are missing the underscores in the title.


    The rest are working, just not outputting correctly. You changed the variables names at the end of the script (in the echo section), you also need to change them within the if statements.

  9. #38
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Try this PHP script on for size, I've added some more detailed echos that might make it easier to troubleshoot for you. Some of the variable names are changed, so be sure to replace your entire order.php with this.

    Code:
    <?php
    error_reporting(E_ALL);
    $name = $_POST['user'];
    $email = $_POST['emailaddress'];
    $address = $_POST['mailingaddress'];
    	
    if (isset($_POST['services_logo']))  {
    	$company_name = $_POST['companyname'];
    	$company_description =  $_POST['companydescription'];
    }
    
    if (isset($_POST['services_businesscard']))  {
    	$bcard_company_name = $_POST['bcardcompanyname'];
    	$company_contact = $_POST['companycontact'];
    }
    
    if (isset($_POST['services_webgraphic']))  {
    	$forum_name = $_POST['forumname'];
    	$sig_avatar_description =  $_POST['sig_avatar_description'];
    }
    
    if (isset($_POST['services_flyer']))  {
    	$what_event = $_POST['whatevent'];
    	$what_for = $_POST['whatfor'];
    	$who_for = $_POST['whofor'];
    	$other_info = $_POST['otherinfo'];
    }
    
    if (isset($_POST['services_notecard']))  {
    	$artwork = $_POST['selectedartwork'];
    	$buy = $_POST['y_n'];
    }
    
    
    if (isset($_POST['services_buyartwork']))  {
    	$artwork_name = $_POST['artworkname'];
    }
    
    
    if (isset($_POST['services_other']))  {
    	$other_service = $_POST['otherservice'];
    	$other_service_description = $_POST['description'];
    }
    
    
    /* TESTING OUTPUT */
    echo "Name:" . $name . "<br>";
    echo "Email:" . $email . "<br>";
    echo "Address:" . $address . "<br>";
    echo "Company Name:" . $company_name . "<br>";
    echo "Company Description:" . $company_description . "<br>";
    echo "Company Name for Business Card:" . $bcard_company_name . "<br>";
    echo "Company Contact:" . $company_contact . "<br>";
    echo "Forum Name:" . $forum_name . "<br>";
    echo "Sig/Avatar Description:" . $sig_avatar_description . "<br>";
    echo "What is the event?:" . $what_event . "<br>";
    echo "What is it for?:" . $what_for . "<br>";
    echo "Who is it for?:" . $who_for . "<br>";
    echo "Other event information:" . $other_info . "<br>";
    echo "Notecards: Artwork to be included:" . $artwork . "<br>";
    echo "Buy artwork with notecards?" . $buy . "<br>";
    echo "Selected artwork:" . $artwork_name . "<br>";
    echo "What do you need?:" . $other_service . "<br>";
    echo "Please describe:" . $other_service_description . "<br>";
    If you understand all of this, you can go on to emailing/saving to database (assuming it works as you want it).

  10. #39
    Join Date
    Feb 2008
    Location
    Not telling! (sorry...)
    Posts
    48
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    you are amazing, you know that? Thank you so much!

    I replaced what I had with this, and it works - as long as I filled in every text box. I tried only doing one of the services, and it gave me a bunch of "notice: undefined variable" with the name and line location of each text box when I submitted it...

    oh, and um... will I need to change anything in the html to correspond to the php file?

  11. #40
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I replaced what I had with this, and it works - as long as I filled in every text box. I tried only doing one of the services, and it gave me a bunch of "notice: undefined variable" with the name and line location of each text box when I submitted it...
    Yeah, that's because of this: error_reporting(E_ALL);. It reports all errors (no matter how inconsequential). I've added it for debugging purposes. You should remove it before you publish. The errors basically mean that the field on the HTML page were blank...which they were. It's not a critical error by any means (if you return to the default error reporting state, it won't show anything).

    oh, and um... will I need to change anything in the html to correspond to the php file?
    If everything works and you're comfortable with the formatting, nope! The way that the output is showing up (minus the errors and empty fields) is how the results will be emailed to you, so make sure you're happy with that.

    Next step: database. Think about what information you want to save, and how you want the database to be set up.

Bookmarks

Posting Permissions

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