This question already has answers here: PHP POST not working (10 answers) Closed 7 years ago.
I have the simplest form possible and all I want to do is echo whatever is written in text box.
HTML:
<form action="" method="post"> <input type="text" name="firstname"> <input type="submit" name="submit" value="Submit"> </form>
PHP:
if(isset($_POST['submit'])){ $test = $_POST['firstname']; echo $test; }
The problem is it’s not working on my server (it works on another server). Does anyone has an idea what could be wrong? There are other forms on the server and are working fine.
Related Posts:
- POST an array from an HTML form without javascript
- navigate back with PHP form submission
- Why php tag is not working in html file?
- How to read if a checkbox is checked in PHP?
- How to fix ‘Notice: Undefined index:’ in PHP form action
- xajax expanding list query
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- Email Not Sending from Byethost Hosting
- Send email with PHP from html form on submit with the same script
- laravel updateOrCreate method
- HTML Element Array, name=”something[]” or name=”something”?
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- what does a .php?id=&value=value means?
- Creating a search form in PHP to search a database?
- How do you parse and process HTML/XML in PHP?
- What is the difference between the ‘www’ folder and ‘htdocs’ folder?
- curl POST format for CURLOPT_POSTFIELDS
- PHP mail function doesn’t complete sending of e-mail
- The character encoding of the HTML document was not declared
- What is wrong in chrome “net : Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR”?
- Notice: Undefined offset: 0 in
- Sending POST data without form
- PHP Redirect with POST data
- How to run a PHP function from an HTML form?
- Do I need a !DOCTYPE declaration in a php file with html?
- Redirecting to a page after submitting form in HTML
- Generate PDF from HTML PHP
- add_filter the_content str_replace after shortcode
- Upload Image in a WordPress page using PHP
- How to trigger $_GET request within admin plugin page?
- My form action url is being prepended with a directory that does not exists
- How to store data from multiple forms using ajax and php
- Why Won’t My Inputs in a form with a Get method work together?
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Search WordPress using static html page
- How to execute html code inside php?
- How to add post meta in while loop?
- File Uploader – Upload without adding to Media Library
- Adding attribute to the post.php form tag in wp-admin
- WordPressUser Submission Form
- Custom forms with HTML
- Cascading dropdown select search based on Parent Page & Child Page
- HTML Form Question
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- wordpress form action page not found
- Custom HTML form using PHP – help with ajax/username validation
- How can I process a form submission from an HTTP POST request?
- Changable favicon
- Ajax call to php function doesn’t work PHP code
- How can I get my pagination loop to display the correct number of total pages?
- Woocommerce custom attributes list help
- custom search query database in child theme
- .html form added to a page
- WooCommerce multiple custom fields code
- Creating a WordPress addon for ContactForm7 submission (.XML file export)
- How to override html codes in wordpress?
- Using transients to store form notifications
- Insert data from form to database
- Access certain Entry in HTML-Table and pass the entry-data in WP not working [closed]
- submit form data to wordpress existing database table using my plugin
- not able to access $_POST on backend profile update
- AMP version of e-commerce without plugin
- Creating wordpress user registration form
- Allowing HTML elements in title widgets spacing problem
- Target a specific container to style on WordPress storefront theme
- Switch position of elements in the footer [closed]
- Add Text Area To Child Theme’s Home Page
- How to include different html tags in the header for different pages?
- Custom Plugin Develoment, Form Action
- Use PHP to inject HTML into before page renders?
- Create html tree sitemap
- How to make a parent page for author.php?
- Creating Log-In Page for backend server
- Can’t get_users info by using json_encode
- get/show Last ID
- user update profile for custom code
- scroll scrpit to particular button position to next id when click button
- Vertical Menu for one page only
- Bootstrap Carousel Indicators Won’t Cycle On Custom WordPress Theme
- Multisite – Display different header content based on which site is accessed
- Adding action item to admin users table and sending email
- Trouble with checked() for array of multiple checkboxes
- Remove active cursor from form field
- If input field has value Require another field – PHP
- Splitting table data to pages with numbers
- Show post/page into div using function
- wordpress, Category ID
- Pass form attributes to another php template in wordpress
- How to remove a css class for any wordpress page
- How to hide the form after successful php execution
- Form tries to download a file on submit
- Code works on page-example.php by not category-example.php
- html to posts, jpg to featured image, zip file contains jpg and html
- how to remove replicating a tag inside loop?
- How to create a php page to collect information from a html page
- How do you change the tag font size in the repeater-template.php [closed]
- PHP tag in post content makes wordpress go crazy