• Resolved JustinBadger

    (@justinbadger)


    Hello everyone!
    I’m working on a site for my company and need to execute a php mailing script from an html form. I’m having trouble doing this. I don’t know how to point the form to the php file. I have put the form’s code in a page already and uploaded the php file to several different directories via ftp. Am I doing somthing wrong/missing something?

    I can provide the code by email if anyone wants to look at it.

    Thanks Everyone!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you using this via plugin or is it a stand-alone script?

    https://codex.www.ads-software.com/Writing_a_Plugin

    Have a look at the plugins Contact Form 7 Free Offering and Gravity Forms Paid Offering, might save the pain and can be modified from setting by the website admin!

    Also you could include the php file in the theme and load in functions.php, then call a function passing in the details

    HTH

    David

    Thread Starter JustinBadger

    (@justinbadger)

    Hey Guys!

    Thanks for the quick replies!

    Jorge:
    I am using a stand alone script that I uploaded into several wordpress directories try to get it to work.

    Digital:
    I should have been more specific in what I need. For now I only need it to email someone with what someone else filled out in the form in a nicely formatted page. I can deal with the formatting. In the future however I’d like my script to be able to submit the form contents to the MySQL database so that it is searchable via another form and script. I’m not sure if Contact Form 7 would accomplish that?

    Please let me know with any suggestions!
    Thanks!

    Gravity Forms is the absolute best form plugin. Seriously, check it out. It does anything you can possibly think of, even pay your bills. It’ll send and email, save to the database, you can even get it to post content, conditional form fields, conditional send to email addresses, etc.

    I would suggest the contact form feature in JetPack by Automattic. You can send mail via form and it’s saved in the database. I use it on production Websites and I’m happy with it. Oh, and it’s free to use.

    Each form plugin has its own upside/downside depending on who wrote the script and what their specifications are and if it works for you.

    If you still plan to write your own script: I’d suggest to write it in a plugin. Advantages: WordPress is happy with plugins but not too happy with outside scripts. I think the DEVs set this up as a security feature so that some scripts wouldn’t wreak havoc on your site and leave it vulnerable to attack.

    Wish I could be more of a help, best wishes.

    Thread Starter JustinBadger

    (@justinbadger)

    Hi Denis!
    Thanks for that. I’ll check it out and see what my boss thinks.

    Hi again Jorge!
    I’ll check out your plugin idea too, but I need it to be a form for submitting jobs and keeping track of them too. Guess I should have mentioned that… Anyway, free is always good. Any good plugin tutorial you can suggest?

    Thanks everyone for your quick replies and help!

    There are also some project management plugins out there, I have not used any, but as with most plugins you can alter the code as they are GPL licenced, so you could start with one of them.

    Have a Google and see whats out there.

    I had a look at the php and MySql opensource Kimai a while back but there was not a connector at the time.

    David

    Thread Starter JustinBadger

    (@justinbadger)

    Hi again guys, Sorry for the late reply.

    Digital: I’ve downloaded gravity forms and it is truley amazing! Does everything I need it to do! Thanks very much for that!

    Thanks to everyone else too for advice!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can I run php files on a wordpress site?’ is closed to new replies.