Hack Forums
[Help] HTML made a contact form, code after form gets put into the box for message. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Help] HTML made a contact form, code after form gets put into the box for message. (/showthread.php?tid=5434066)



HTML made a contact form, code after form gets put into the box for message. - Rezy - Oct 15, 2016

Could anyone help me with this.
The problem is that i get the contact form looks like this:
Spoiler (Click to View)

Code i use:
Code
<center><form action="contact.php" method="post">
   <p> <strong>Your name</strong></p>
    <input type="text" name="cf_name">
    <p><strong>Your e-mail</strong></p>
    <input type="text" name="email">
<p><strong>Subject</strong></p>
    <input type="text" name="subject">
   <p> <strong>Message</strong></p>
     <textarea name="message">
</form></center>

<p><strong><h2><b>call us on +27 79 334 4885,
Business hours 8am-4pm</strong></h2></b></p>

Spoiler (Click to View)


* - xHeaven - Oct 15, 2016

Probably this is what you need. If yes, please close all html tags next time.

Code
<center><form action="contact.php" method="post">
   <p> <strong>Your name</strong></p>
    <input type="text" name="cf_name"></input>
    <p><strong>Your e-mail</strong></p>
    <input type="text" name="email"></input>
<p><strong>Subject</strong></p>
    <input type="text" name="subject"></input>
   <p> <strong>Message</strong></p>
     <textarea name="message"></textarea>
     <p><button type="button" name="submit">Submit</button></p>
</form>

<p><strong><h2><b>call us on +27 79 334 4885<br>
Business hours 8am-4pm</strong></h2></b></p></center>



* - Rezy - Oct 15, 2016

(Oct 15, 2016 07:57 AM)xHeaven Wrote:  Probably this is what you need. If yes, please close all html tags next time.

Code
<center><form action="contact.php" method="post">
   <p> <strong>Your name</strong></p>
    <input type="text" name="cf_name"></input>
    <p><strong>Your e-mail</strong></p>
    <input type="text" name="email"></input>
<p><strong>Subject</strong></p>
    <input type="text" name="subject"></input>
   <p> <strong>Message</strong></p>
     <textarea name="message"></textarea>
     <p><button type="button" name="submit">Submit</button></p>
</form>

<p><strong><h2><b>call us on +27 79 334 4885<br>
Business hours 8am-4pm</strong></h2></b></p></center>

Which one was not closed?


* - xHeaven - Oct 15, 2016

(Oct 15, 2016 08:11 AM)Ͳimmy Ͳurner Wrote:  Which one was not closed?

Textarea.


* - Rezy - Oct 15, 2016

(Oct 15, 2016 08:54 AM)xHeaven Wrote:  Textarea.

That's not supposed to be closed


* - Hash G. - Oct 15, 2016

(Oct 15, 2016 09:21 AM)Ͳimmy Ͳurner Wrote:  That's not supposed to be closed

I'm not sure where'd you think that from.
http://www.w3schools.com/tags/tag_textarea.asp


* - Light - Oct 15, 2016

You need to close text area.


* - xHeaven - Oct 15, 2016

(Oct 15, 2016 09:21 AM)Ͳimmy Ͳurner Wrote:  That's not supposed to be closed

No, the "input" tag don't need to be closed(idk why I did it lol), textarea need to be closed, because:

Code
<input type="text" name="subject">Text here -> the text outside of the textbox

<textarea name="message">Text here -> the text inside the textbox



* - Rezy - Oct 15, 2016

Alright i am sorry. I never saw that thought it was closed further on.