Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 06-01-2014, 10:02 AM
ediko ediko is offline
Contributing Member
 
Join Date: 01-16-13
Location: Nigeria
Posts: 104
iTrader: 0 / 0%
Please Help With PHP Code For HTML5 Contact.

Hello,
I am new to HTML5 and please i want you to help me with a PHP code for HTML5 contact form.
Here's the code below:
Code:
<form id="contact-form"> <div class="success">Contact form submitted!<br> <strong>We will be in touch soon.</strong> </div> <fieldset> <label class="name"> <input type="text" value="Name:"> <span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span> </label> <label class="email"> <input type="email" value="E-mail:"> <span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span> </label> <label class="name"> <input type="text" value="Phone Number:"> </label> <label class="message"> <textarea>Message:</textarea> <span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span> </label> <div class="form_buttons"> <a class="btn" href="#" data-type="submit"><strong>submit</strong></a> </div> </fieldset> </form>
Thank you very much.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 06-01-2014, 10:52 AM
Katt's Avatar
Katt Katt is offline
Moderator
 
Join Date: 12-14-13
Location: Texas
Posts: 1,563
iTrader: 0 / 0%
What is the form action? This form won't do anything without a script to process it. Is it a php script? Cgi / perl script (not allowed by all hosting companies) ?

What problem are you having?
 
Reply With Quote
  #3  
Old 06-01-2014, 11:20 AM
ediko ediko is offline
Contributing Member
 
Join Date: 01-16-13
Location: Nigeria
Posts: 104
iTrader: 0 / 0%
Sorry, it's a PHP form action that i need.
 
Reply With Quote
  #4  
Old 06-01-2014, 11:28 AM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,700
iTrader: 5 / 100%
Where did you get this form from? As Katt said, it will not work as it is now.

HTML Forms and Input Down at the bottom where it says Submit Button is an example of what we are trying to explain. You need action and method to get it to work.
 
Reply With Quote
  #5  
Old 06-01-2014, 01:28 PM
Katt's Avatar
Katt Katt is offline
Moderator
 
Join Date: 12-14-13
Location: Texas
Posts: 1,563
iTrader: 0 / 0%
If you're new to code and writing this yourself, don't worry that you forgot the action this time - I've been doing code a long time and I still occasionally get worked up when something doesn't work, only to later realize I'd forgotten something crucial - like changing a path, or setting the form action LOL It happens.
 
Reply With Quote
  #6  
Old 06-01-2014, 01:33 PM
ediko ediko is offline
Contributing Member
 
Join Date: 01-16-13
Location: Nigeria
Posts: 104
iTrader: 0 / 0%
The problem here is that the PHP code for form action that i usually use for xHTML is not working for HTML5
 
Reply With Quote
  #7  
Old 06-01-2014, 01:41 PM
Katt's Avatar
Katt Katt is offline
Moderator
 
Join Date: 12-14-13
Location: Texas
Posts: 1,563
iTrader: 0 / 0%
I don't know why it wouldn't work for one and not the other on the same server, all other things being equal. Can you post the form action code? I'm no pro at php but I have some experience and know enough that maybe I can help. At the very least, I can run it thru a few tests on my server to see how it behaves.
 
Reply With Quote
  #8  
Old 07-26-2014, 11:21 AM
ediko ediko is offline
Contributing Member
 
Join Date: 01-16-13
Location: Nigeria
Posts: 104
iTrader: 0 / 0%
I went on a break. I still have problem in PHP form wih HTML5 form.
The way i usually make a PHP form code is not working in HTML5.

Here's the HTML5 form code and please i want you to help me out with a PHP form code.

Thanks.

Quote:
<form method="post" action="contact-post.html">
<div class="contact-to">
<input type="text" class="text" value="Name..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name...';}">
<input type="text" class="text" value="Email..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email...';}" style="margin-left: 10px">
<input type="text" class="text" value="Subject..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Subject...';}" style="margin-left: 10px">
</div>
<div class="text2">
<textarea value="Message:" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}">Message..</textarea>
</div>
<div>
<a href="#" class="submit">Send a Message</a>
</div>
</form>
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is HTML5 a2zfame Coding Forum 1 09-10-2013 04:19 AM
HTML5 Meta tag tips and Rich Snippet Code help kamrynhughes Coding Forum 0 10-06-2012 02:27 AM
Need Help: Obfuscated Code and Spam from Contact Form baby.hack Coding Forum 1 05-05-2011 12:48 PM
Import Contact List from various messengers and contact books WelcomeSimBack Coding Forum 0 08-15-2007 10:17 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 03:37 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC