The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Can someone recommend a customizable contact form, please? Reply To: Can someone recommend a customizable contact form, please?


include_once "path/to/contactMichael1961.php";

the path here “path/to/…” was not meant to be literal. I don’t know what the path to your file will be, because I don’t know where you saved it. You need to replace this with the actual file path.

For example, if you used the class name as the filename and saved it in your /home/users/www/phpclasses directory, then the path would be /home/users/www/phpclasses/contactMichael1961.php.

<?= $contactForm->contact-form/contact.css(); ?>

Think you mixed up two lines of code, there. It should just be:

<?= $contactForm->cssStyle(); ?>

<!-- Form Code Start -->

Don’t put the form html in manually; we’re making the object take care of that. To create the form, you should have only

<?= $contactForm->htmlMarkup(); ?>

I made a second page on our gist (scroll down) modeled after your contact page. You will still need to figure the location (filesystem path) of your class file, so you can include it.

all I’m getting is a white page.

That’s usually the result of a fatal error, when php is configured not to show any error messages. It’s probably because the include failed, and so there was no class definition when you try to create the contactForm object. Fixing the path to the class definition should solve this.