Using a PHP Form in WordPress Page (6 posts)

  1. mikem1986
    Posted 7 years ago #

    Hi guys

    Im currently making a taxi website for a client and in my wordpress page i have coded a php form, the form works fine until when you come to submit it i get a 404 error? I know this is because the page title is coming before the action attribute as such....

    <form style="text-align: left;" action="pagebooking.php" method="post">

    this is at the top of the form, and for the otherhalf of the form i have

    <form method="post" action="pagebooking.php">

    but when i click the submit button on the page it goes to

    make-a-booking/pagebooking.php and thus returns a 404?

    Ive tried making a pagebooking.php and adding the code to the page but that didnt work and ive also tried adding the code at the bottom of the page but that also didnt work? Anyone else have any ideas?

  2. mikem1986
    Posted 7 years ago #


  3. S.K
    Posted 7 years ago #

    There are very good and reliable contact form plugins available, which take care of all such aspects and are also highly customizable.

    You may like to use them.

    (Perhaps you know about them but still want to hand-code one yourself!)


  4. mikem1986
    Posted 7 years ago #

    Hi Kichu

    Yes i do know about them but theyre not intergrateable with a commerce solution i need to put it...

    Basically i want the user to fill in the form, then this then sends to the email and then they also have the option of paying a deposit when using the booking form

  5. ryans149
    Posted 7 years ago #

    create a custom page and link it to navigation bar.

  6. Lares
    Posted 6 years ago #

    When I used a php form I only copied and pasted generated code to my web pages on wordpress site

Topic Closed

This topic has been closed to new replies.

About this Topic