Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Coding a PHP contact form (was re: WordPress)

  • 11-05-2013 01:42PM
    #1
    Banned (with Prison Access) Posts: 42


    Hello fellow Wordpressers. I am using Wordpress too. I have a little problem though at the moment and I am looking for a fix for it. I want to create a quick contact me form on the home page of a website. I don't necessarily want to use a plugin. I have set the form up in the html <form>action="process_form" method="post"</form> etc. I then want to create the process_form.php page when I create this page using a .php page from wordpress the form does not seem to be able to find the process_form.php page and I get an error Page Not Found 404 when the form is filled in and submitted. Any suggestions? I can PM people the site name and let you take a look at it if possible. Thanks Ben


Comments

  • Registered Users, Registered Users 2 Posts: 9,061 ✭✭✭Kenny Logins


    Why not use a plugin?


  • Registered Users, Registered Users 2 Posts: 1,907 ✭✭✭zom


    benbrown wrote: »
    form does not seem to be able to find the process_form.php page

    Is your action="process_form" link correct? First check if it points correctly - add it to some text and then see if link works fine.
    Another thing is that usually process_form.php is only managing data sending and you should have one hidden input like that:

    [FONT=tahoma, arial]<INPUT TYPE=hidden NAME="redirect" value="http://www.server.com/formsent.html&quot;>[/FONT]

    to point user to website you want him to go after submit form.


  • Closed Accounts Posts: 7,144 ✭✭✭DonkeyStyle \o/


    Make sure to activate Akismet, or you'll spend your whole life deleting spam comments.


  • Registered Users, Registered Users 2 Posts: 16,415 ✭✭✭✭Trojan


    There's a load of reasons why a PHP form may not be working, you'll need to go through all the possibilities (or just use a plugin).


  • Closed Accounts Posts: 27,856 ✭✭✭✭Dave!


    Post up the relevant code


  • Advertisement
Advertisement