I really need your guys help as i have built a website and have added two contact forms. Which i managed to get from a tutorial off youtube. Now the contact duplicated the forms and have put one on the home and contact form page. they both work and is able to send the emails but on the home page it loses its footer and introduction part and on the contact form page it looses its footer. And I have run out off ideas on what to do.
So if anyone has got a solution of fixing it or better way of inputting a contact form pleeessssee giv me a shout
What do you mean “it looses its footer”? (BTW, the correct word in this case is lose, not loose)
If the footer on the page(s) disappears when you insert the form, then I would suspect you have not properly closed an HTML tag in the form. Or you have inserted the form in such a way that it leaves a dangling tag.
Have you viewed the page(s) in various browsers? Some browsers are more forgiving of such errors.
Have you tried a tool like Firebug or the “view element” in Chrome to spot the error?
k, not seeing anything glaringly obvious that would cause that… step back a layer and show me the code for the form itself? (PS: wrap them in [ PHP ] [ /PHP ] tags (no spaces))
<[COLOR="#FF0000"]div[/COLOR] class="submit">
<input type="submit" id="submit" name="submit" value="Send Message" />
</form>
<?php else: ?>
<p style=" font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#333333; margin-left:25px;">Thank You For Your Request</p>
<script type="text/javascript">
setTimeout('ourRedirect()', 5000)
function ourRedirect(){
location.href='contactform.php'
}
<?php endif; ?>
</[COLOR="#FF0000"]div[/COLOR]><!-----end .submit----->
Notice how the opening tag for the div is inside the “if” part of the if/else? Well, when we run the ELSE (the form has been submitted), there is no opening tag for that </div>, so it closes the next element up the chain - which causes your alignment issue. Move the offending line (the bottom one) to just below the submit button’s input tag.