1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved On submit form just spits out email.php

Discussion in 'Web Design & Development' started by EspressoBean, Jun 27, 2018.

Thread Status:
Not open for further replies.
Advertisement
  1. EspressoBean

    EspressoBean Thread Starter

    Joined:
    Feb 29, 2016
    Messages:
    264
    So I have a contact form script which does server side validation and throws back any errors to javascript to print. I am using PHPMailer to actually send the emails. When I click on submit with every field being empty, instead of printing errors as it should, it just spits out email.php.

    Where am I going wrong?

    main form (formMaster.php):
    https://hastebin.com/exipesovuz.php

    recaptcha.php:
    https://hastebin.com/lisegapoda.php

    email.php:
    https://hastebin.com/owovecovak.php

    javascript:
    https://hastebin.com/tetibuduve.js

    index.html:
    https://hastebin.com/yemozoqogo.html
     
  2. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
    Are you using a WAMP or XAMPP pseudo server? I also notice your form's action sctipt is for formMaster.php - does such a file exist?
     
  3. EspressoBean

    EspressoBean Thread Starter

    Joined:
    Feb 29, 2016
    Messages:
    264
    I am using an actual server with Linux Centos 7, apache 2 running with PHP 7
     
  4. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
  5. EspressoBean

    EspressoBean Thread Starter

    Joined:
    Feb 29, 2016
    Messages:
    264
    Last time I did that I got an assortment of attacks hitting me, I rather refrain from posting a public link.
     
  6. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
    Does it? Woops - my bad - you've included it ...
     
  7. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
    I shall have a good look into it later - I'm just going to watch the World Cup Soccer right now ...
     
  8. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
    I found some time between matches;)
    I set up an emulation of your hastebin script, locally and upon blank form submission receive a syntax error in the recaptchs:
    "Parse error: syntax error, unexpected '[', expecting ')' in C:\xampp\htdocs\TSG\recaptcha.php on line 4"
    If you are getting as far as spitting out email.php (the next include), then you have dealt with the syntax problems.
    Can you give us the current code you are using, please?
     
  9. EspressoBean

    EspressoBean Thread Starter

    Joined:
    Feb 29, 2016
    Messages:
    264
  10. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,241
    First Name:
    Jim
    Hi @EspressoBean :)
    Unfortunately the Main script link is not working:(
    Why not put your code into the thread, using the Insert Icon at the top of the reply box (4th from right)?
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1212091

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice