Hi,

Thanks for your reply.
plz check the below simple code.. i can't get values from $_POST & $_REQUEST

<?php

print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";

print "<form action='' method='post'>
          <input type='text' name='inputname'>
          <input type='submit' name='test'>
          </form>";

You need to insert url for form action.

<?php

print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";

print "<form action='<destination-url>.php' method='post'>
          <input type='text' name='inputname'>
          <input type='submit' name='test'>
          </form>";
?>

Copy the following code into the file called "sample.php" It should work.

<?php

print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";

print "<form action='sample.php' method='post'>
          <input type='text' name='inputname'>
          <input type='submit' name='test'>
          </form>";
?>

here, try this sample...

********this is your index.php

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

*******this one's your welcome.php

Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.


</form>

Thanks xuexue,PoA and ShawnCplus.

I think the problem was php/apache. i re-installed php and apache. now everything is working.

This question has already been answered. Start a new discussion instead.