...

View Full Version : Form and Footer Help Needed



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;
}

Chris Hick
11-07-2010, 11:05 PM
Can you give me the entire html page and css page? Its easier for me to see it that way and fix the problem.

davm22
11-08-2010, 08:45 PM
I've been fiddling around with the coding and the problem still remains. Can anyone help? The problem seems to be the footer not staying at the bottom even though I have

position: absolute;
bottom: 0px;

Can anyone help?

teedoff
11-08-2010, 08:49 PM
I've been fiddling around with the coding and the problem still remains. Can anyone help? The problem seems to be the footer not staying at the bottom even though I have

position: absolute;
bottom: 0px;

Can anyone help?

Do you have a link to this page? If you're using divs with floats, did you clear your floats for the footer?

davm22
11-08-2010, 08:53 PM
Do you have a link to this page? If you're using divs with floats, did you clear your floats for the footer?

Sorry I dont have a link to the page.

I am not using any floats at all, should I be? Ill have to read up some more

teedoff
11-08-2010, 08:58 PM
Sorry I dont have a link to the page.

I am not using any floats at all, should I be? Ill have to read up some more

I thought you were. According to your other post, I thought I saw some divs with floats in your css. Yes floats are your friend...lol read up on how to use them and how to clear them so no floated elements resume normal document flow.

davm22
11-08-2010, 09:24 PM
I thought you were. According to your other post, I thought I saw some divs with floats in your css. Yes floats are your friend...lol read up on how to use them and how to clear them so no floated elements resume normal document flow.

Had a quick look and float would only float things right or left so it wouldnt be ideal for this situation unless I am wrong?

Every other page seems to be fine

I have changed the coding and now it appears like the below. I want it so my red layer (#layer1) appears at the bottom. I thought about using bottom as auto but that didnt have the desired effect on other pages

http://img181.imageshack.us/img181/6823/webform2.png

my coding for the red layer is:


#layer1 {
position: absolute;
left: 150px;
right: 150px;
margin-left: auto;
margin-right; auto;
top: 0px;
bottom: 0px;
z-index: 1;
background-color: #ed1c24;
border: 10px solid #ed1c24;
}




#footer {
font-size: 12px;
text-align: center;
background color: #ed1c24;
padding: 5px;
height: auto;
width: 100%;
border: 1 px solid #000;
visibility: visible;
z-index:10;
position: relative;
top: auto;
bottom: 0px;
}

davm22
11-08-2010, 10:24 PM
The footer is now at the bottom of the site.

However, the layer1 (the red background) isnt going all the way to the bottom.

For this layer I have:


#layer1 {
position: absolute;
left: 150px;
right: 150px;
margin-left: auto;
margin-right; auto;
top: 0px;
bottom:auto;
z-index: 1;
background-color: #ed1c24;
border: 10px solid #ed1c24;
padding-bottom:10px;
}

and



#layer1 {height: 100%}

teedoff
11-08-2010, 10:45 PM
Again, I would recommend downloading firebug to help you with debugging some of these issues you're having. Its free and is very useful for these kind of issues.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum