php post form to another php

Posted by proyb2 on Stack Overflow See other posts from Stack Overflow or by proyb2
Published on 2010-05-16T06:07:47Z Indexed on 2010/05/16 6:10 UTC
Read the original article Hit count: 398

Filed under:

I want to post a search value from index.php to search.php,

index.php

and search.php or

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=".

© Stack Overflow or respective owner

php post form to another php

Posted by proyb2 on Stack Overflow See other posts from Stack Overflow or by proyb2
Published on 2010-05-16T07:30:34Z Indexed on 2010/05/16 7:40 UTC
Read the original article Hit count: 398

Filed under:

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=".

© Stack Overflow or respective owner

Related posts about php