post values to external page explicitly PHP
Posted
by JPro
on Stack Overflow
See other posts from Stack Overflow
or by JPro
Published on 2010-05-28T10:02:14Z
Indexed on
2010/05/28
10:21 UTC
Read the original article
Hit count: 168
Hi,
I want to post values to a page through a hyperlink in another page. Is it possible to do that?
Let's say I have a page results.php which has the starting line,
<?php
if(isset($_POST['posted_value']))
{
echo "expected value";
// do something with the data
}
else
{
echo "no the value expected";
}
If from another page say link.php
I place a hyperlink like this:
<a href="results.php?posted_value=1">
, will this be accepetd by the results page?
If instead if I replace the above starting line with
if(isset($_REQUEST['posted_value']))
, will this work?
I believe the above hyperlink
evaluates to GET, but since the only visibility difference between GET and POST that is you can see parameters in the address bar with GET
But, is there any other way to place a hyperlink which can post values to a page? or can we use jquery in the place of hyperlink to POST
the values?
Can anyone please suggest me something on this please?
Thanks.
© Stack Overflow or respective owner