Help Fixing Me a contact Form.

Discussion in 'PHP' started by TheJugernaut, Jun 30, 2011.

  1. #1
    I really need help in fixing contact form on my website.

    Basically the code is here:

    <!--contact form-->
          <div id="contact_form" class="contactForm">
            <form action="submit-form.php" method="post">
    
              <ul>
                <li>
                  <label for="name">Name *</label>
                  <input name="name" type="text" name="name" id="name" class="txtFld" />
                  <span id="errorName" class="formError"></span> </li>
                <li>
                  <label for="email">Email *</label>
    
                  <input name="email" type="text" name="email" id="email" class="txtFld" />
                  <span id="errorEmail" class="formError"></span> </li>
                <li>
                  <label for="subject">Subject</label>
                  <input name="subject" type="text" name="subject" id="subject" class="txtFld" />
                </li>
                <li>
                  <label for="message">Message * </label>
    
                  <textarea name="message" name="message" id="message" cols="30" rows="5" class="txtAra"></textarea>
                  <span id="errorMessage" class="formError"></span> </li>
                <li style=" margin-bottom: 0px;">
                  <input type="submit" value="" class="submit" id="submit" />
                  <span id="formProgress" class="formProgress"></span> </li>
              </ul>
            </form>
    
          </div>
          <!--contact form ends--> 
    Code (markup):
    I just dont know what to put in action form, is there any php script for that? If so can someone make it and I will pay 4$ (max currently :/).

    Hope someone can help me in this issue.
     
    TheJugernaut, Jun 30, 2011 IP
  2. artus.systems

    artus.systems Well-Known Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    103
  3. hackimos

    hackimos Greenhorn

    Messages:
    75
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    #3
    in the file submit-form.php, (the action of the form) you can get any of the values inside the <form> tag using $_POST["<name_attribute>"]
    exemple: to get the value of the Email text field, you write $email = $_POST["email"];
    now you can use the variable $email in the file submit-form.php
     
    hackimos, Jul 1, 2011 IP
  4. nice.wallpapers

    nice.wallpapers Active Member

    Messages:
    142
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Hi buddy ,

    You want to save that data in database or email ?

    Thanks ,
     
    nice.wallpapers, Jul 1, 2011 IP