Title: Can&#8217;t save PHP $_POST code
Last modified: June 14, 2022

---

# Can’t save PHP $_POST code

 *  [phatman](https://wordpress.org/support/users/phatman/)
 * (@phatman)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/cant-save-php-_post-code/)
 * Hi, I can’t save any PHP code with $_POST, $_SESSION etc. It just goes to a 404
   page when I try to save it. Anyone, know what the issue is? I’m guessing it’s
   WordPress messing with code submission?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Sruthy@xyzscripts](https://wordpress.org/support/users/sruthyxyz/)
 * (@sruthyxyz)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/cant-save-php-_post-code/#post-15738308)
 * Would you please cross check and let know that the issue persist only when the
   code contains $_POST, $_SESSION etc?
 *  Thread Starter [phatman](https://wordpress.org/support/users/phatman/)
 * (@phatman)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/cant-save-php-_post-code/#post-15739029)
 * I could insert other basic PHP code like ‘echo’ and it saves fine but anything
   with $_ and it wouldn’t save it just goes to a 404 page.
 * Today the plugin is crashing WordPress so I had to deactivate it. I’m using WordPress
   6 and PHP 8
 *  [gameprofitsio](https://wordpress.org/support/users/gameprofitsio/)
 * (@gameprofitsio)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/cant-save-php-_post-code/#post-16045763)
 * I can reproduce this,
 * <form action=”<?php home_url( $wp->request ) ?>” method=”POST” class=”enter-activity”
   >
    /// ya da yada ya da
 *     ```
       <select id="userID" name="userID">
                   <?php 
                   if ($user_info->roles[0] == "administrator"){
                         foreach ($users as $user) {
                           echo "<option value='$user->id'>$user->display_name</option>";
       ```
   
 * /// ya da yada ya da
 * $newActivityID = isset($_POST[‘userID’]);
 * This is a pretty a simple coding job that’s not working, very dissapointing
 * WordPress 6.0.2
    Insert PHP Code Snippet (V 1.3.3)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Can’t save PHP $_POST code’ is closed to new replies.

 * ![](https://ps.w.org/insert-php-code-snippet/assets/icon-128x128.png?rev=1800967)
 * [Insert PHP Code Snippet](https://wordpress.org/plugins/insert-php-code-snippet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php-code-snippet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php-code-snippet/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [gameprofitsio](https://wordpress.org/support/users/gameprofitsio/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/cant-save-php-_post-code/#post-16045763)
 * Status: not resolved