Put var_dump($_SERVER['PHP_SELF']);
at the top of header.php
and you will see the problem. That always points to index.php
because nearly everything loads through index.php
.
Use get_permalink
to get the “apparent” URL and use that instead of $_SERVER['PHP_SELF']
in the form action attribute.
Related Posts:
- Send message to author without showing email address [duplicate]
- What is & used for
- What characters are allowed in an email address?
- Sending form data via PHPMailer – How to action PHP script from a form
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- Contact Form 7 not sending emails- no confirmation, no error [closed]
- Remove field in the form : only works for “url”, not for “email”?
- PHP form is not sending mail if I use mime type and version in header. How to solve this? [closed]
- Downloadable content only for subscribers?
- WordPress Emails & Contact Forms [closed]
- Saved emails at dashboard
- Email from my theme’s contact form doesn’t get the reply-to address right
- Email form getting hacked
- Am receiving more than thousand mails in single day from ‘[email protected]’ continuously
- Using an iframe for a form help
- Sending Form data as Attachment
- .html form added to a page
- Sending email via function in page or setting up the action properly in another page
- Remove active cursor from form field
- Send contact form to a specific referrer-email adres
- Username from e-mail
- wordpress not saving form code in code editor
- Form that stores emails [closed]
- How can I add email code authentication on form submission without any wp plugin?
- navigate back with PHP form submission
- Angular: mat-form-field must contain a MatFormFieldControl
- PHP mail function doesn’t complete sending of e-mail
- How to get rid of blue outer border when clicking on a form input field?
- JavaScript code to stop form submission
- Add error message on password protected page
- how to set from address according to the form input email address for wp_mail()?
- How do we remove the H3 tag for the reply-title I.D
- User registration problem in WordPress
- show image in mail contact form 7 [closed]
- Submitting post to database then redirecting to paypal
- Registration form labels – add asterisk
- Wp_mail Returning False on Server
- Help with verifying google recaptcha in a custom form
- Are there any standard HTML markup for metabox?
- Duplicating/Cloning Multiple Form Fields
- Mail Form in a modal box without plugin
- Processing a subscription form with POST method?
- How am I able to get the value out of cookie array when I push a button?
- What is the valid phone number format accepted by contact-form-7 [closed]
- How to implement post/redirect/get pattern on contact form
- Creating a custom multilingual form
- wordpress not displaying my form
- Send email button in custom post type backend
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- not logged in users can’t submit form
- How to add a button that enables the user to insert a link in a textarea located in the front-end?
- post request does not redirect but why
- How can I create registration form for users which I can assign role and profile picture?
- Creating User Form Submission – Only allow them to see their own submissions
- Using Contact Forms to Send Private Information [closed]
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Adding a new user from the front end
- Saving frontend form data in wordpress
- Validating custom fields before post save
- Form action URL unrecognized
- Is there a WordPress form plugin that can easily be configured for Google Analytics goals?
- How to validate my form
- Front end update_post_meta Help
- retrieve all emails as database in wordpress to view all sent emails
- Unable to upload data to Media Libary
- Dashboard Contact Form
- How can I receive uploaded attach file as a Google drive link [closed]
- Contact form – problem with displaying message about sent mail
- Exporting a form to a CSV file does not work in WordPress but it does in PHP
- HTML Form Question
- Sliding Register – Login Forms
- How to change a wordress plugin php code in my child’s functions.php file?
- AMP and Paypal form CORS issue
- Clickable Text To Replace Radio buttons
- Form element name – array type is not working
- Embedding Links to WPForms on a WP Page
- Unexpected token admin.php
- display a message if get form is empty
- Scroll Form with page scrolling and add form on slider
- How to send custom mail when a user complete a specific form
- Adding a different domain to existing WordPress site
- WordPress, Front-end send message to authors using plugin when their post is published
- why form in front-page.php redirect to blog page
- Multiple Taxonomy post query with exclusion
- How do i can data from my custom form to a custom table
- Form Sanitization and Validation
- Custom forms + Polylang
- What is the proper way to embed the HTML of an external form such as payflowlink from paypal?
- How to make caption field required in media library?
- Update a string from the front-end
- Update post meta without deleting the old entries
- How to creat form with get method and receive it
- custom form submission
- Using form method in a template WordPress page
- Reset form on onclick function
- Can’t find function which is called in a wordpress theme
- Dynamic price for payment button
- Forms lead to “Page not found” in Ultimate Member plugin
- How to use tag in wordpress?
- Implementing Autosave Functionality for Long, Multi-page Forms in WordPress