Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

contact.php controls not working

Asked Modified Viewed 3,534 times
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
asked
Senior Member

Hi all,

If this has been solved I did not use the correct search (= I did search but could not find the result).

I scarcely used the contact.php form, so I never checked before.

Edit: I'm using recaptcha and it seems to have something to do with the problem.

Now, I am trying to build a paged based on it (see this message if interested).

The problem is the controls do not work but for the captcha and the message itself:

- one can send a message without name
- one can send a message without email
- one can send a message without subject

Example :

www.corpfrance.com/_private/blank0.jpg


=> results (in my Outlook):

www.corpfrance.com/_private/blank1.jpg


Any idea on how I could correct this?

Thanks.
Edited by Quartzkyte on 14-06-2014 11:51,
0 replies

15 posts

F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Did you made any changes to contact.php ?
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

Hi,

Thank you for your reply.

You gave me a doubt, I double-checked by re-downloading the original package.

I still do have the problem, but limited to the use of Google's reCaptcha.
Very strange. :o

The good news is I'll have the possibility to make it work with securimage/securimage2 :|
...
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Do you have the same error in the web client ?

I'm asking because it might be an outlook problem.
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

Yes, I do... :@
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Sorry. I tested it on my site and I can send a message via contact form without filling the name/email/subject.
I think it's a core bug.
Edited by faga on 15-06-2014 14:19,
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

B) somewhat reassuring but so strange... I'm no real coder but from the little bit I know I can't see anything obvious.
Thank you for your time anyway.
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Somehow if we use the recaptcha option it doesn't check if the name/email/subject are field, but only those fields.
It checks the message filed and it won't send a message without it.
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Doesn't matter what kind of stuff is used, because the actual code has it:

$error is generated upon blank fields found.

original code..

if (!$error) {
      require_once INCLUDES."sendmail_include.php";
      if (!sendemail($settings['siteusername'],$settings['siteemail'],$mailname,$email,$subject,$message)) {
         $error .= " <span class='alt'>".$locale['425']."</span><br />\n";
      }
   }


what if we interject the checks.


$error = '';
$mailname = isset($_POST['mailname']) ? substr(stripinput(trim($_POST['mailname'])), 0, 50) : "";
$email = isset($_POST['email']) ? substr(stripinput(trim($_POST['email'])), 0, 100) : "";
$subject = isset($_POST['subject']) ? substr(str_replace(array("\r","\n","@"), "", descript(stripslash(trim($_POST['subject'])))), 0, 50) : "";
$message = isset($_POST['message']) ? descript(stripslash(trim($_POST['message']))) : "";

if ($mailname && $email && $subject && $message && !$error) {
require_once INCLUDES."sendmail_include.php";
.... // follow through
}


Send email uses function sendemail(); so, stop it from being executed. You can run any custom checks as I've shown. Sorry, I didn't test the crux of the problem, but from the core file, it looked fine?
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

I made a quick test and it works. The only thing left is that it displays that the message was sent, but actually not. I will look into that later.
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

I have a family reunion this afternoon, I'll look into it tonight but it seems very promising.
Thank you guys.
P.S. did you try with securimage or reCaptcha?
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Yes.
0 replies
J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

The bug is in the reCaptcah check file, here https://github.com/PHPFusion/PHPFusion/blob/master/includes/captchas/recaptcha/captcha_check.php#L22
$error = null;
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

So,

Changing the sendemail place at hien's suggestion works with securimage.

But F.Y.I. I could not get the reCaptcha to work, though, what should I change for that?

Thank you all...
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

Quote

So,

Changing the sendemail place at hien's suggestion works with securimage.

But F.Y.I. I could not get the reCaptcha to work, though, what should I change for that?

Thank you all...
- by Quartzkyte


I use reCaptcha and it works. As I said the only problem is that is states that the message was sent, but actually it wasn't . I sent multiple messages and neither of them was sent if the name/email/subject field where empty.
0 replies
J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

Quote

But F.Y.I. I could not get the reCaptcha to work, though, what should I change for that?

Ummm... I thought I made it obvious :/ just remove $error = null; from /includes/captchas/recaptcha/captcha_check.php
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 15 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

Q
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
F
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
J
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet