creating a contact us page

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
svautour
Posts: 7
Joined: Fri Aug 14, 2009 4:29 pm

creating a contact us page

Post by svautour »

Hi,

How do I create a contact us page? I'm looking to create a similar page as your ---

http://faq.phpmyfaq.de/contact.html

But, I just want the message box and the send email. No name, no emails, etc...

thanks,
SV
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: creating a contact us page

Post by Thorsten »

Hi,

and also no captcha?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
svautour
Posts: 7
Joined: Fri Aug 14, 2009 4:29 pm

Re: creating a contact us page

Post by svautour »

Yes. I would like no captha.

thanks again.
SV
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: creating a contact us page

Post by Thorsten »

Hi,

remove the following code in template/contact.tpl:

Code: Select all

    <label for="name" class="left">{msgNewContentName}</label>
    <input class="inputfield" type="text" name="name" value="{defaultContentName}" size="40" /><br />

    <label for="email" class="left">{msgNewContentMail}</label>
    <input class="inputfield" type="text" name="email" value="{defaultContentMail}" size="40" /><br />
Change the code in sendmail.php from

Code: Select all

if (!is_null($name) && !is_null($email) && !is_null($question) && IPCheck($_SERVER['REMOTE_ADDR']) && 
    checkBannedWord(htmlspecialchars($question)) && $captcha->checkCaptchaCode($code)) {

    $mail = new PMF_Mail();
    $mail->unsetFrom();
    $mail->setFrom($email, $name);
to

Code: Select all

if (!is_null($question) && IPCheck($_SERVER['REMOTE_ADDR']) && 
    checkBannedWord(htmlspecialchars($question))) {

    $mail = new PMF_Mail();
    $mail->unsetFrom();
Not tested, should work.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply