Help - Search - Members - Calendar
Full Version: What's wrong with my html?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Keefo
I'm making a Registration Form for a site I'm working on. I'm a bit new at html. I got the html code from my clients old site, but had to make some changes.

I finally got the submit button to work and tested it out and it was sent to my email, the only problem is... my email is blank. None of the information that was filled out in the form is there. Would you guys be able to check out my code and see what my problem might be... I've been staring at it for so long now it's all looking jumbled. blink.gif lol.

I greatly appreciate it and Thanks in advance!

CODE
<p align="center"><strong><em>Please provide all applicable information.<br />
                    Fill our the form then print a copy of this page and mail with payment before submitting.</em></strong></br>
                    <<p style="text-align: center;"><em class="nobold"><strong>Bush Tennis Center</strong><br /> P.O.Box 4914<br /> Midland, TX 79704</em>
<!-- end #noprint -->
                    <form class="registrationforms" action="http://bushtenniscenter.com/sendmail.php" method="post">
            <input type="hidden" name="recipient" value="9087sdf9078s8s">
                                <input type="hidden" name="subject" value="Bush Tennis Center Program Registration">
                                <input type="hidden" name="redirect" value="../index.php?option=com_content&view=article&id=74:registration-confermation&catid=2:uncategorised">
                                 <input type="hidden" name="Program" value="Midland QuickStart">
                      <p align="center" class="larger"><strong>Program Name: Midland QuickStart Tennis</strong></p>
                     <p><em>All applicable information is required</em></p>
                      <p>Name
                        <input name="Name" type="text" id="0011" size="40" />
                      </p>
                      <p>Date of Birth
                        <input name="DOB" type="text" id="0012" size="10" />
                        Age
                        <input name="Age" type="text" id="844" size="4" />
                      Grade
                        <input name="Grade" type="text" id="00122" size="4" />
School
                        <input name="School" type="text" id="00123" size="20" />
                      </p>
                      <p>Gender:  
                        <input type="radio" name="Gender" id="gender" value="Boy" />
                        Boy
                                
                        <input type="radio" name="Gender" id="gender2" value="Girl" />
                        Girl
                      </p>
                      <p>Ethnicity:
                        <input type="radio" name="Enthicity" id="ethnicity" value="AfricanAmerican" />
                        African American  
                        
                        
                        <input type="radio" name="Enthicity" id="ethnicity2" value="Asian" />
                        Asian  

  
                        <input type="radio" name="Enthicity" id="ethnicity3" value="Caucasian" />
                        Caucasian  

  
                        <input type="radio" name="Enthicity" id="ethnicity4" value="Hispanic" />
                        Hispanic  

  
                        <input type="radio" name="Enthicity" id="ethnicity5" value="Other" />
                      Other </p>
                    
                      <p>List any special needs/health issues:</p>
                      <p>
                        <textarea name="SpecialNeeds" id="specialneeds" cols="60" rows="5"></textarea>
                      </p>
                      <p>Mom/Guardian
                        <input name="MomName" type="text" id="00112" size="40" />
                      </p>
                      <p>  Phones: Cell
                        <input name="MomCell" type="text" id="00124" size="14" />
Work
<input name="MomWork" type="text" id="0125" size="14" />
Home
<input name="MomHome" type="text" id="0126" size="14" />
                      </p>
                      <p>Dad/Guardian
                        <input name="DadName" type="text" id="001122" size="40" />
                      </p>
                      <p>  Phones: Cell
                        <input name="DadCell" type="text" id="001242" size="14" />
                        Work
  <input name="DadWork" type="text" id="01252" size="14" />
                        Home
  <input name="DadHome" type="text" id="01262" size="14" />
                      </p>
                      <p>Email
                        <input name="Email" type="text" id="0011222" size="32" />
                      <span class="smaller">Used only to inform you of upcoming events</span></p>
                      <p>List dates attending
                        <input name="Dates" type="text" id="00112222" size="50" />
                      </p>
                     <p>Paid $
                        <input name="AmountPaid" type="text" id="textfield" size="12" />
                        By (select one):  
                        <input type="radio" name="PaymentType" id="gender3" value="Cash" />
                       Cash
                        
   -or-    
                       <input type="radio" name="PaymentType" id="gender4" value="Check" />
                       Check

                      Check #:
<input name="Check#" type="text" id="textfield2" size="6" />
                     </p>
                      <p align="center">
                        <input type="submit" name="submit" id="submit" value="Submit Registration" />
                      </p>
                      <p align="center"><a href="../index.php/component/content/article/2-uncategorised/33-privacy-notice">Read our Website Privacy Statement</a> </p>
                      <div id="officeuse">
                        <p align="center">For Office Use Only:</p>
                        <p>Total Paid $_________ <br />
                          $________ for _______________ Program                                 Scholarship Needed ___ Yes    ___ No <br />
                          $________ for _______________ Program                                 $_______ Value of Scholarship<br />
                          $________ for _______________ Program                                 $_______ # of hours needed for scholarship<br />
                          $________ for _______________ Program                                 Hours need to be complete by: _________<br />
                          <br />
                          Payment rec'd by: _____________  Registration confirmed by: _______________ Date: ___________<br />
                        </p>
                      </div>
                    </form>
<div style="margin: 3em 0 8px 0; text-align: center;" align="center"></div>
  <!-- end #mainContent --></div>
Vikas arora
What problem you are facing while executing this code. While I take overview of your code I did not find any problem.... But problem may be here once I would look deep it.

Please what execution you want and what problem showing with this code
Keefo
QUOTE(Vikas arora @ May 17 2012, 03:48 AM) *

What problem you are facing while executing this code. While I take overview of your code I did not find any problem.... But problem may be here once I would look deep it.

Please what execution you want and what problem showing with this code


When I hit the submit button, it sends the email, and directs me to the Registration Confirmation page so that all works. When I go to view the email, it's blank. None of the information shows up in the email.
Christian J
We must probably see the code in sendmail.php as well. In the meantime, ethnicity is spelled wrong here:

CODE
<input type="radio" name="Enthicity"

(maybe there are more form fields with incorrect names).

There are also quite a few validator errors in the HTML that you should fix, but they are likely not causing the email problem.
Keefo
QUOTE(Christian J @ May 17 2012, 01:44 PM) *

We must probably see the code in sendmail.php as well. In the meantime, ethnicity is spelled wrong here:

CODE
<input type="radio" name="Enthicity"

(maybe there are more form fields with incorrect names).

There are also quite a few validator errors in the HTML that you should fix, but they are likely not causing the email problem.


Thanks for that... Like I said I'm a bit of a novice.. I was trying to replicate the old html and update it for the newer site..

This was the sendmail.php that you asked about.. It's probably that is where I'm going wrong I'm thinking..
CODE
<?php
  $email = $_REQUEST['email'];
  $message = $_REQUEST['message'];

  mail( "keith@exampel.com", "Program Registraition Form",
    $message, "From: $email" );
  header( "Location: http://bushtenniscenter.com/index.php?option=com_content&view=article&id=74:registration-confermation&catid=2:uncategorised" );
?>
pandy
I edited your email address so the spam bots won't slurp it up.
Christian J
CODE
<?php
  $email = $_REQUEST['email'];
  $message = $_REQUEST['message'];

The above looks for form fields named "email" and "message", none of which appear in the HTML example (there is a field named "Email" though). It does not look for any of the other form fields in the HTML example.

Badly written email form scripts can be used as spam relays. I suggest using the email form and -script that your webhost provides, if available, or otherwise use an HTML form and script from the same (reliable) source.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.