Shoutbox

Contact Form Code - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Contact Form Code (/showthread.php?tid=49060)

Contact Form Code by Tasha on 08-16-2005 at 08:55 PM

I want a contact form on my site, but I just need to know a code for it, basically. I don't really want a plugin or anything like that.

I need the basic fields:

Name:
Email:
Website:
Message:

And then a submit button which submits to my email. :tongue:

Thanks for any help. :happy:


RE: Contact Form Code by Fourjays on 08-16-2005 at 09:01 PM

Sign up on here: http://allforms.mailjol.net/main.html

Then make a form on your website (html). Wordpress will run standard HTML code. Then follow the instructions on the site above for details of making the form go to your email. :p

HTML Form tutorial: http://www.w3schools.com/html/html_forms.asp


RE: Contact Form Code by ShawnZ on 08-16-2005 at 09:18 PM

code:
<?php

$memail = "Your@email.com";

echo "<table><tr><td>";
if ($_POST['act'] == 'send') {
if (isset($_POST['name'])) {
if (isset($_POST['email'])) {
if (isset($_POST['body'])) {
$_POST['body'] = $_POST['body'] . "\n\n   -- " . $_POST['name']
mail($memail,Contact Form,$_POST['body'],"From: " . $_POST['email'] . "\n" . "Return-Path: " . $_POST['email'] . "\n" . "Reply-To: " . $_POST['email'] . "\n");
echo "<pre style="color:\#FF0000;\">Your comments have been submitted.</pre>";
} } } }
echo "<form method=\"POST\" action \"" . $_SERVER['PHP_SELF'] . "\">"; ?></td></tr><tr><td>Name:</td><td><input type="text" name="name"/></td></tr><tr><td>Email</td><td><input type="text" name="email"/></td></tr><tr><td>Comments:</td><td><textarea name="body"></textarea></td></tr></table></form>

Not sure if it works, wrote it just now...
RE: Contact Form Code by M73A on 08-16-2005 at 09:22 PM

you couldn't have just asked your brother? lol

:P

hmm all i cud do was this... im still naff at html... how do i get it to mail the infromation to an email?

code:
<form name="form1" method="post" action="">
  Name:
  <input type="text" name="textfield">
<p>    Email:   
  <input type="text" name="textfield">
<p>    Website:
  <input type="text" name="textfield">
<p>    Message:
  <input type="text" name="textfield">
<p>
<input type="submit" name="Submit" value="Submit">
</form>

ta

EDIT: oh what its ment to be in php? oops:P can someone still tell me the email thing:P ta
RE: Contact Form Code by ShawnZ on 08-16-2005 at 09:23 PM

quote:
Originally posted by may73alliance
EDIT: oh what its ment to be in php? oops can someone still tell me the email thing ta

you can only do it in php >.<
RE: Contact Form Code by Eljay on 08-16-2005 at 09:24 PM

quote:
Originally posted by may73alliance
you couldn't have just asked your brother? lol

:P

hmm all i cud do was this... im still naff at html... how do i get it to mail the infromation to an email?

code:
<form name="form1" method="post" action="">
  Name:
  <input type="text" name="textfield">
<p>    Email:   
  <input type="text" name="textfield">
<p>    Website:
  <input type="text" name="textfield">
<p>    Message:
  <input type="text" name="textfield">
<p>
<input type="submit" name="Submit" value="Submit">
</form>

ta

http://www.php.net/mail
RE: Contact Form Code by M73A on 08-16-2005 at 09:27 PM

woah i don't know any php so owell:P thanks anyway


RE: Contact Form Code by ShawnZ on 08-16-2005 at 09:29 PM

quote:
Originally posted by may73alliance
woah i don't know any php so owell:P thanks anyway

Then how did you expect the mail to be sent :undecided:
RE: Contact Form Code by M73A on 08-16-2005 at 09:33 PM

quote:
Originally posted by ShawnZ
quote:
Originally posted by may73alliance
woah i don't know any php so owell:P thanks anyway

Then how did you expect the mail to be sent :undecided:

html!

quote:
Originally posted by Fourjays
HTML Form tutorial: http://www.w3schools.com/html/html_forms.asp

RE: Contact Form Code by ShawnZ on 08-16-2005 at 09:38 PM

quote:
Originally posted by may73alliance
quote:
Originally posted by ShawnZ
quote:
Originally posted by may73alliance
woah i don't know any php so owell:P thanks anyway

Then how did you expect the mail to be sent :undecided:

html!

quote:
Originally posted by Fourjays
HTML Form tutorial: http://www.w3schools.com/html/html_forms.asp


Yes, but that method sucks balls and doesn't work on all browsers

it also needs you to open the mail client and hit send aswell :p
RE: Contact Form Code by Tasha on 08-16-2005 at 09:40 PM

It's not meant to be in PHP, as Wordpress doesn't support it. (ShawnZ' code messed my page up big time. O_O)

Thanks for all the help. :happy: I've got it up and working now, just must be a problem at their end, as it's taking a bit for the email to come through. :dodgy:


RE: Contact Form Code by ShawnZ on 08-16-2005 at 09:41 PM

quote:
Originally posted by Tasha
It's not meant to be in HTML, as Wordpress doesn't support it. (ShawnZ' code messed my page up big time. O_O)

Thanks for all the help. :happy: I've got it up and working now, just must be a problem at their end, as it's taking a bit for the email to come through. :dodgy:


:cheesy: wha'd mine do

Edit: and stop using wordpress. +o(
RE: Contact Form Code by Tasha on 08-16-2005 at 09:45 PM

quote:
Originally posted by ShawnZ
quote:
Originally posted by Tasha
It's not meant to be in HTML, as Wordpress doesn't support it. (ShawnZ' code messed my page up big time. O_O)

Thanks for all the help. :happy: I've got it up and working now, just must be a problem at their end, as it's taking a bit for the email to come through. :dodgy:


:cheesy: wha'd mine do

This:

[Image: untitled5gz.th.jpg]

[Image: untitled22ew.th.jpg]

:cheesy:

And leave Wordpress alone. :sad:
RE: Contact Form Code by dotNorma on 08-16-2005 at 09:59 PM

Just dont paste it in wordpress.

Paste a simple html popup link "Contact Me"...You click the link and a small window pops up with the form in it. :-/