Jump to content

iheartlinus

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

iheartlinus's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I change the two $_GET fields to $_POST the code no longer works in the calculator?
  2. So I am using PHP for a four step process. The first step is the user inputting info into a calculator, the second step is that it shows them the calculated total and displays a link to the third step, which is where they enter the contact information and press submit, and then they are redirected to the home page (4th step) The third step is where I am stuck. For some reason the variables are not getting passed from the first form (calculator) to the second form (contact info) and submitted to me. In the email that I am getting I receive the contact info, but none of the calculator info, so I'm assuming my variables are not getting passed? First Step: <form enctype="multipart/form-data" method="post" form action="<?php echo $_SERVER['PHP_SELF']; ?>?submit=true"> <p class="formdesign"> <label for="name"></label> </p> <p class="formdesign"> <label for="email"></label> </p> <p class="formdesign">How many pages do you estimate your site will need? </p> <p> <span class="formdesign"> <label> <input type="checkbox" name="one" value="375" id="one"> Up to 5 pages</label> <br> <label> <input type="checkbox" name="two" value="575" id="two"> Up to 10 Pages</label> <br> <label> <input type="checkbox" name="three" value="775" id="three"> Up to 15 Pages</label> <br> </span></p> <p class="formdesign">Will you be selling items on your Website?</p> <p> <span class="formdesign"> <input type="checkbox" name="four" value="250" /> Yes <input type="checkbox" name="five" value="0"/> No</span></p> <p class="formdesign">Would like to be able to update the site yourself?</p> <p class="footnote">*If you will be selling items skip this step, as all e-commerce sites include a content management system.</p> <p> <span class="formdesign"> <input type="checkbox" name="six" value="150" /> Yes <input type="checkbox" name="seven" value="0"/> No</span></p> <p class="formdesign">Will your site need any of the following?</p> <p> <span class="formdesign"> <label> <input type="checkbox" name="eight" value="25" id="eight" > Audio/Video Player</label> <br> <label> <label> <input type="checkbox" name="nine" value="50" id="nine"> Flash Intro</label> <br> <label> <input type="checkbox" name="ten" value="25" id="ten"> Photo Gallery/Slideshow</label> <br> </span></p> <p><span class="formdesign"> Will you need any of the following? <label> <br> <br> <input type="checkbox" name="eleven" value="50" id="eleven"> Logo/Graphic Design</label> <br> <label> <input type="checkbox" name="twelve" value="50" id="twelve"> Copy (Words)</label> <br> <label> <input type="checkbox" name="thirteen" value="25" id="thirteen"> Images</label> </span><br> </p> <input type="submit" value="Price" > </p> </form> </div> <map name="newdesignMap" id="newdesignmap"> <area shape="rect" coords="271,94,335,128" href="work.html" alt="work"/> <area shape="rect" coords="357,93,442,130" href="pricing.html" alt="pricing"/> <area shape="rect" coords="465,90,523,133" href="faq.html" alt="faq"/> <area shape="rect" coords="540,92,637,132" href="designer.html" alt="designer"/> <area shape="rect" coords="652,93,747,134" href="contact.html" alt="contact"/> <area shape="rect" coords="761,95,966,134" href="word.html" alt="word"/> <area shape="rect" coords="715,31,976,71" href="mailto:designer@designs.com" alt="email"/> <area shape="rect" coords="305,708,349,721" href="work.html" alt="work"/> <area shape="rect" coords="360,708,413,726" href="pricing.html" alt="pricing"/> <area shape="rect" coords="424,711,458,722" href="faq.html" alt="faq"/> <area shape="rect" coords="471,708,529,725" href="designer.html" alt="designer"/> <area shape="rect" coords="541,709,599,723" href="contact.html" alt="contact"/> <area shape="rect" coords="608,708,685,723" href="#" alt="sitemap"/> </map> </div> <div class="text" id="result"> <?php $submit = $_GET['submit']; if($submit == "true") { $total = ($_POST['one'] + $_POST['two'] + $_POST['three'] + $_POST['four'] + $_POST['five'] + $_POST['six'] + $_POST['seven'] + $_POST['eight']+ $_POST['nine'] + $_POST['ten']+ $_POST['eleven'] + $_POST['twelve']+ $_POST['thirteen']); echo " Your Price is \$ " .number_format ($total, 2, '.', ','). "<BR>"; echo ('<a href="http://designs.com/projectrequest.… Your Project Started </a>'); } ?> </div> </body> </html> Second Page: <?php session_start(); $submit = $_GET['submit']; if($submit == "true") { header("Location: http://designs.com"); $to = "jessica@designs.com"; $message = "Pages:\t$_POST[one]\n"; $message .= "Logo:\t$_POST[two]\n";
  3. So I have created an HTML form that uses PHP to calculate the price of something. The user fills out the form and hits “Price” and it shows (on the same page) the price. When that page displays I want to add a button to the price that says something to the effect of “Get Started” When the user hit’s the “Get Started” button they will enter their contact information, and I would like the information they entered on the first form, along with the contact information to be captured and emailed to me. I realize it would probably be easier if I just made them put their email address in the first form, but I hate having to give my information out just to find out pricing info, and I don’t want to make potential clients do that. So basically I want the process to work like this: They fill out the “pricing calculator” They Hit Submit and it shows them the Price (This is as far as I have gotten) and a Button that says “Get Started” They Hit “Get Started” and it shows a form that captures their contact information They Hit “Submit” and the contact information AS WELL AS the data they entered into the pricing calculator are emailed to me. Anyone who can help would be a real life saver! Here is my PHP so far: <?php $submit = $_GET['submit']; if($submit == "true") { $total = ($_POST['one'] + $_POST['two'] + $_POST['three'] + $_POST['four'] + $_POST['five'] + $_POST['six'] + $_POST['seven'] + $_POST['eight']+ $_POST['nine'] + $_POST['ten']+ $_POST['eleven'] + $_POST['twelve']+ $_POST['thirteen']); echo " Your Price is \$" .number_format ($total, 2, '.', ','); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.