Reputation: 11
Thanks for accepting me in this website, I'm a scripter trying to do things via php.
I got page named action.php
which it's already in get mode of another page named index.php . So the url is like this ../action.php?id=1
(1 is an example) and another page named action1.php
How can i send the value of the url (1 as an example ) to the another page without using any hidden things?
<form action="action1.php" method="post"'>
Upvotes: 1
Views: 56
Reputation: 2891
you can do that with couple ways;
$_SESSION
// in form file
$value = $_GET["something"]; // get your GET value
$_SESSION["param"] = $value; // store on session
// in action.php
echo $_SESSION["param"]; // get stored value from session
but first, before the use session, you need to start session with session_start()
method
$GLOBALS
$GLOBALS['param'] = $value';
echo $GLOBALS['param']
Upvotes: 1