davm22
11-07-2010, 11:01 PM
I thought I would start a new thread instead of hijacking the other one. Apologies for all the threads today, hopefully these will stop!
Right, you need to create your form, for example -
...
[/CODE]
Then u need a page that relates to the "thanks.php"
that cotains this -
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "PUT UR EMAIL ADDY HERE!!";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>
Give that a shot!
Thanks for that, I have just started HTML/CSS coding a couple of days ago so apologies for the stupid questions.
With the thanks.php page, do I have to create that page similar to my template pages but with the javascript above incorporated somewhere? Or do I incorporate the above script within the Contact Form page?
I would also like to align the left (e.g. First Name) and right (e.g. the text fields) sections.
I am using the following code:
<form>
<form action="thanks.php" method="post">
<p>First Name: <input type="text" name="firstname" value=""/></p>
<p>Last Name: <input type="text" name="lastname" value=""/></p>
<p>Address: <textarea name="comments" rows="3" cols="30"></textarea></p>
<p>Contact Telephone Number: <input type="text" name="telnumber" value=""/></p>
<p>Message: <textarea name="comments" rows="7" cols="30"></textarea></p>
<p><input type="submit" name="Submit" value="Send" /></p>
<p><input type="reset" /></p>
</form>
However, the footer comes up above the form, please see the picture below. Can anyone help?
http://img440.imageshack.us/img440/9647/webform.png
My CSS code for the footer is:
#footer {
font-size: 12px;
text-align: center;
background color: #ed1c24;
padding: 5px;
height: auto;
width: 100%;
visibility: visible;
z-index:10;
position: absolute;
top: auto;
bottom: 0px;
}
Right, you need to create your form, for example -
...
[/CODE]
Then u need a page that relates to the "thanks.php"
that cotains this -
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "PUT UR EMAIL ADDY HERE!!";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>
Give that a shot!
Thanks for that, I have just started HTML/CSS coding a couple of days ago so apologies for the stupid questions.
With the thanks.php page, do I have to create that page similar to my template pages but with the javascript above incorporated somewhere? Or do I incorporate the above script within the Contact Form page?
I would also like to align the left (e.g. First Name) and right (e.g. the text fields) sections.
I am using the following code:
<form>
<form action="thanks.php" method="post">
<p>First Name: <input type="text" name="firstname" value=""/></p>
<p>Last Name: <input type="text" name="lastname" value=""/></p>
<p>Address: <textarea name="comments" rows="3" cols="30"></textarea></p>
<p>Contact Telephone Number: <input type="text" name="telnumber" value=""/></p>
<p>Message: <textarea name="comments" rows="7" cols="30"></textarea></p>
<p><input type="submit" name="Submit" value="Send" /></p>
<p><input type="reset" /></p>
</form>
However, the footer comes up above the form, please see the picture below. Can anyone help?
http://img440.imageshack.us/img440/9647/webform.png
My CSS code for the footer is:
#footer {
font-size: 12px;
text-align: center;
background color: #ed1c24;
padding: 5px;
height: auto;
width: 100%;
visibility: visible;
z-index:10;
position: absolute;
top: auto;
bottom: 0px;
}