Embed using IFrame
Iframe gives you the option of using an external URL to load its contents to create a box on your web page. Iframe is one of the easiest ways to embed a contact form on your web page.
Here is a sample iframe code:
<iframe src='/contact/contactus.php' frameborder='0' width='100%' height='600' allowtransparency='true'></iframe>Including a header and footer in the contact form page.
Embed the contact form using a common header and footer on your website. You can include the header and footer in the contactform.php.
This method allows you to preserve the same look across the website.
Here is some sample code that illustrates this method.
Including the header:
<body> <!--Note: The header is included here --> <?php include('../includes/header.php'); ?> <!-- The form start from here--> <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post'> <fieldset > </script><!-- Note: Here we include the footer --><?php include('../includes/footer.php'); ?></body></html> |