PHP Post Variables are empty
Posted: Fri Apr 03, 2009 1:38 pm
Hi Everyone,
Issue: PHP Post variables are empty after submit.
Details:
<?php
include("function.php");
echo $_POST['id1'];
echo $id1;
fnc1();
?>
function.php:
function fnc1() {
ID1=<?=$_POST['id1'];?>
<form method="post">
<input type="hidden" name="id1" value="login" />
<input type="submit" />
</form>
}
Steps taken to fix this issue (although unsuccessful)
A. 1. wrote the below code snippet to get php config: (Thanks to developers like you that posted in some forum)
<?php
phpinfo();
?>
2. register_globals is off
3. Both the variables _POST['variableName'] and $variableName seem to be empty.
B. Tried copying php.ini to public_html folder.
Additional Information: GET variables work and POST variables are empty.
Please advise.
Issue: PHP Post variables are empty after submit.
Details:
<?php
include("function.php");
echo $_POST['id1'];
echo $id1;
fnc1();
?>
function.php:
function fnc1() {
ID1=<?=$_POST['id1'];?>
<form method="post">
<input type="hidden" name="id1" value="login" />
<input type="submit" />
</form>
}
Steps taken to fix this issue (although unsuccessful)
A. 1. wrote the below code snippet to get php config: (Thanks to developers like you that posted in some forum)
<?php
phpinfo();
?>
2. register_globals is off
3. Both the variables _POST['variableName'] and $variableName seem to be empty.
B. Tried copying php.ini to public_html folder.
Additional Information: GET variables work and POST variables are empty.
Please advise.