I need to include a simple contact form in either the sidebar or footer of an existing website so it appears on every page.

This is not a WordPress site, I have seen there are several plugins for WordPress. I need a different solution. I am thinking a php include would be my best option. However, my php skills are minimal. Can someone out there point me in the right direction? Any advice would be much appreciated.

I have searched all day and have yet to find a good solution.

You'll just need to include a file that will output your form, something like:

// small_form.php
echo <<<EOT
    <form method="post" action="your_form_handler.php">
        <!-- your inputs here -->
        <input type="submit" />
    </form>
EOT;

Then you can just:

include 'small_form.php';

where needed.

Thanks for the info. I will give it a try. I will probably be posting more or bothering you again next week when I begin this project.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.