php post form to another php
- by proyb2
I want to post a search value from index.php to search.php,
index.php
<form action="search.php?val=" method="post">
and search.php
<?php echo $_GET['val']?>
or
<?php echo $_POST['val']?>
I would like to retain 'val' value in the URL, but search.php could not capture the value of 'val' which appear to be "val=".