Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php contact form

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24819
    AlCapone
    Participant

    Hi, at the moment i have a php file (on wordpress) and i have included a form with wich the test area will be sent to my email adress, when you start the form you define the action ‘action = "file.php’. If the file the form is on is already a php file, do i have to send the action to a differant file of can i put the action inside the same file?

    Many Thanks
    CHris

    #57324
    mdgrech
    Member

    You can post the form to itself and include the php file at the top of your document. You can steal/download my contact form at http://mdgrech.com to see what I mean. Basically it goes like this though:

    <?php
    include("form_file.php);
    ?>
    <html>
    <head>
    </head>
    <body>
    <form action=""<?php echo $_SERVER; ?>" method="post">
    <!–Form Content–>
    </form>
    </body>
    </html>

    #57326
    AlCapone
    Participant

    O.k ill probablly try that in a minute thanks, looks cool,but before that, if my form’s method is ‘post’ should i be redirected to the php file when i click submit? because i am, is there a way to stop this redirection and stay on the current page? also in the form i have ‘action = "postform.php", im in wordpress, the file with the form and the php file are in the same file, but it says the php file cant be found when the redirections ocures and the mail is not sent.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.