The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Contact Form Coding

2 posters

Go down

Contact Form Coding Empty Contact Form Coding

Post by THEM4VR1CKM00SE July 11th 2012, 12:18 pm

hey guys, i just thought i would ask to see if anyone can help, im not that good with html coding, but im creating a contact form for members to email me if there is any issues etc.. well i have the coding for it..

<h2>Contact Form</h2>
<form action="" method="post">
<span style="color:#FF0000; font-weight:bold;"><?=$messages ?></span>
<table width="50%" border="0">
<tr>
<td width="50%" valign="top"><div align="right"><strong>Your Email Address : </strong></div></td>
<td width="50%" valign="top"><input type="ext" id="email" name="email" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Message Subject : </strong></div></td>
<td valign="top"><input type="ext" id="subject" name="subject" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Your Message </strong></div></td>
<td valign="top"><textarea name="message" cols="50" rows="10" id="message"></textarea></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="center">
<input type="submit" value="Send Message">
</div></td>
</tr>
</table>
<input type="hidden" name="sendmessage" value="1">
</form>

Thats the coding for it, but where in that code will i put my email adress so it goes straight there?

Thanks
avatar
THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by LGforum July 11th 2012, 1:18 pm

You have to add a mailto action.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by THEM4VR1CKM00SE July 11th 2012, 1:48 pm

can you tell/show me what that it please?

Give an example in that coding..
avatar
THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by LGforum July 11th 2012, 8:30 pm

<form action="mailto:email@domain.com" method="post">

The support for this wouldn't be great. I think it requires the user to have an email client set up on their computer like Outlook or something, but its your only choice without using any server side scripting.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by THEM4VR1CKM00SE July 11th 2012, 8:45 pm

so just for instance, if i did this

<h2>Contact Form</h2>
<form action="mailto:email@domain.com" method="post">
<form action="" method="post">
<span style="color:#FF0000; font-weight:bold;"><?=$messages ?></span>
<table width="50%" border="0">
<tr>
<td width="50%" valign="top"><div align="right"><strong>Your Email Address : </strong></div></td>
<td width="50%" valign="top"><input type="ext" id="email" name="email" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Message Subject : </strong></div></td>
<td valign="top"><input type="ext" id="subject" name="subject" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Your Message </strong></div></td>
<td valign="top"><textarea name="message" cols="50" rows="10" id="message"></textarea></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="center">
<input type="submit" value="Send Message">
</div></td>
</tr>
</table>
<input type="hidden" name="sendmessage" value="1">
</form>

i added it just under the top one, is that fne and will it still work ?
avatar
THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by LGforum July 11th 2012, 8:50 pm

No you replace the old one. The old one is serving you no purpose at the moment. Its not got an action attribute (well it has buts its empty). I'd suggest reading more into how forms work and what they actually do.

You may as well remove this: <?=$messages ?>
Its server side coding which is serving you no purpose on forumotion, and will only work on a PHP file (and only if the shortcut is enabled, and there is a variable named messages)
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by THEM4VR1CKM00SE July 11th 2012, 10:40 pm

hmmm, you got any links what could help me on that acpect ?
avatar
THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

View user profile

Back to top Go down

Contact Form Coding Empty Re: Contact Form Coding

Post by LGforum July 12th 2012, 1:08 am

LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum