I want to get post values from current page while my form action is pointing to another page. Below is code sample:
<form id="form1" name="form1" action='page2.php' method="post">
<input type="text" id="test" name="test" value="<?php echo 'test'; ?>" />
<input type='submit' value='submit' />
</form>
//i want to get the value here but it's not working because all value pass to page2.php
$value = $_POST['test'];
echo $value;
Advise me how to perform this guys!