Hello, I am having a hard time getting a value sent to via POST.
I have a PHP code which outputs this HTML:
Please select your preferred ADMIN AREA language:
<!-- beginning of admin language selector drop down menu //-->
<form action="/?p=menuedit" method="post">
<script type="text/javascript">var url_full = "/?p=menuedit&l=en";</script>
<img src="/images/flags_iso/24/us.png" style="position:relative;top:7px;" />
<select name="l_admin" OnChange="this.form.submit();window.location.href=url_full;">
<option value="en" selected>English</option>
<option value="it">Italiano</option>
</select>
</form>
<!-- end of admin language selector drop down menu //-->
I also tried using just <form action="" method="post"> or even just <form method="post">.
This form resides on the page /?p=menuedit (I am actually generating that part of the HTML with this PHP):
echo '<form action="/?'.$_SERVER['QUERY_STRING'].'" method="post">';
At the top of the page, for the sake of testing it, I put:
echo $_POST['l_admin'];
But every time I submit the form I get:
Notice: Undefined index: l_admin in /home2/memory/public_html/globals.inc.php on line 26
In other words, somehow it seems like my form is not submitting the post values... Can somebody help me figure out what I am doing wrong?
Thanks a lot