Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7578541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:27:25+00:00 2026-05-30T17:27:25+00:00

I am posting a form in an expressionengine (1.6.8) template. I’m doing it using

  • 0

I am posting a form in an expressionengine (1.6.8) template. I’m doing it using jquery but have tried an HTML form too – same result. The PHP superglobal $_POST is empty after posting the form, even though I have PHP enabled on my templates (on input for the template containing the form and output on the processing template) and can see the POST variables in firebug.

Can anyone suggest what might cause this?

<html>
<head>
    <script type="text/javascript" src="/_scripts/jquery-1.6.1.min.js"></script>

    </head>
    <body>
        <form action="/select-locale/processing" method="POST">
            <input type="text" name="test"/>
            <input type="submit" name="submit" value="submit">
        </form>
        <a id="test" href="">link</a>

            <script type="text/javascript">
                $(function(){
                    $('#test').bind('click', function(e){
                        e.preventDefault();
                        var path = "/select-locale/processing"
                        var form = $('<form/>');
                        form.attr("method", "post");
                        form.attr("action", path);
                         var field = $('<input></input>');

                        field.attr("type", "hidden");
                        field.attr("name", 'locale');
                        field.attr("value", 'NZ');

                        form.append(field);
                        $('body').append(form);

                        form.submit();
                    });
                });


            </script>
    </body>
</html>

server-side code (inherited, not my own) :

<?php
var_dump($_POST);
var_dump($_GET);exit;
if ( ! isset($_POST['locale']))
{
    $locale = FALSE;

    $returnPage = "/";
}
else
{
    $locale = $_POST['locale'];

    $returnPage = $_POST['returnPage'];


}

if (isset($_GET['locale'])) {

    $locale = $_GET['locale'];
    $returnPage = "/"; 
?>
{exp:cookie_plus:set name="cklocale" value="<?php echo $locale;?>" seconds="2678400"}

{exp:session_variables:set name="userLocale" value="<?php echo $locale;?>"}  <?php
}
?>
{exp:cookie_plus:set name="cklocale" value="<?php echo $locale;?>" seconds="2678400"}

{exp:session_variables:set name="userLocale" value="<?php echo $locale;?>"}  


{exp:session_variables:get name="testSession"} 

{if  '{exp:session_variables:get name="testSession"}'=='yes' }
    {redirect="<?php echo $returnPage;?>"}
{if:else}
    {redirect="/nocookies/"}
{/if}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:27:27+00:00Added an answer on May 30, 2026 at 5:27 pm
    • check the network tab if the parameters you want are really sent out

    • check the url if it’s correct

    • if you use any sort of routing mechanism or url rewrite, you might wanna review it also

    • check your validation and XSS rules (if any) as it may reject the whole array once hints of XSS is found.

    happened to me a while ago (CI) and i was sending it to the wrong url

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Symfony 1.4. I'm posting a form via Jquery ajax to an action
I am posting a very simple form using a method I have used frequently
hie i have a html form and while posting a request to a url
I have a signup form posting to my customers_controller, but now they want the
I have an HTML form POSTing to the following index.php: <?php require_once(/home/full/path/to/included/file.php); ?> And
I am posting form data to a page that is using jQuery tabs. Because
When using the jQuery submitHandler method, I'm posting the form data via ajax to
I'm posting a form to an MVC action using jquery Ajax. Server side, I
I have tried two different implementations for simulating POSTing a form. One uses fsockopen
I have registration form on my website that, using jquery I append default values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.