Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times

    PHP Form Not Submitting - Wrong Action?

    I was at this for hours. The .php file will not submit the fields to my email address. Any ideas?

    PHP CODING
    <!-- Contact Form Start -->
    <div class="contact-form">
    <form method="post" action="index.php" id="contactform">
    <div class="grid_6">
    <input type="text" name="contactname" id="contactname" value="" placeholder="* Name">
    <input type="text" name="email" id="email" value="" placeholder="* Email">
    <input type="text" name="subject" id="subject" value="" placeholder="* Subject">
    </div>
    <div class="grid_6 omega">
    <textarea name="message" id="message" placeholder="* Message"></textarea>
    </div>
    <div class="clear"></div>
    <p>* Required Fields</p>
    <input type="submit" value="Send Message" name="submit" class="contact-button">
    </form>
    </div>
    <div class="clear"></div>
    <!-- Contact Form End -->
    </div>
    </div>

    HTML CODING

    <!-- Contact Form Start -->
    <div class="contact-form">
    <form method="post" action="#" id="contactform">
    <div class="grid_6">
    <input type="text" name="contactname" id="contactname" value="" placeholder="* Name">
    <input type="text" name="email" id="email" value="" placeholder="* Email">
    <input type="text" name="subject" id="subject" value="" placeholder="* Subject">
    </div>
    <div class="grid_6 omega">
    <textarea name="message" id="message" placeholder="* Message"></textarea>
    </div>
    <div class="clear"></div>
    <p>* Required Fields</p>
    <input type="submit" value="Send Message" name="submit" class="contact-button">
    </form>
    </div>
    <div class="clear"></div>
    <!-- Contact Form End -->
    </div>
    </div>

    Any ideas?
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Are you getting any errors ? Or ???

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    Your PHP coding and your HTML coding are the same ...
    Nothing will happen in your PHP coding, because you are not doing any PHP scripting to process the form or send the email.

    Your HTML coding is fine, but you need an actual PHP script to do the work.

    Here's the deal though ....

    Don't just ask us, can you give me the PHP script?, because you have a lot of things unanswered. It looks like you are requiring some fields and need some javascripting to validate those fields. That requires even more scripting (javascripting AND some more PHP). Not sure about captcha either.

    So you should use Google to find the proper AJAX (PHP and javascripting) scripts to handle contact forms, whether you are emailing them or saving the information in a database.


  5. #4
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    @mlseim... I never come here expecting someone to write code for me. I'm an art director that received code from a coder that I paid. The coder is not getting back to me, so I posted the question. My entire PHP file is a lot longer than this. I just posted the code. As for the JavaScript file, well there are about seven of them for the single page. Hopefully I can find an answer. Your suggestion is valid but a kinder response would be nice.

  6. #5
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    @Webzarus... No errors. When I click to send, the page deletes all of the fields and jumps to the top of my homepage. The site is Ballard Studio - Samuel Ballard, Jr. - Art Director | Package Designer | Graphic Designer


Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 10:20 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com