Simple button
Moderator: General Moderators
Simple button
Hello,
Please excuse my noviceness, but i have a simple page with a variable in php called $worksord. I would simply like to submit that value into the next page at the click of a button.
I cannot seem to pass it across to the next page?
Thanks
Dave
Please excuse my noviceness, but i have a simple page with a variable in php called $worksord. I would simply like to submit that value into the next page at the click of a button.
I cannot seem to pass it across to the next page?
Thanks
Dave
Use something like this:
On nextpage.php retrieve the variable by using:
Code: Select all
<a href="www.yourdomain.com/nextpage.php?var=$worksord">Next Page</a>Code: Select all
$_GETїvar];Actually, retrieve it like thiszenabi wrote:Code: Select all
$_GETїvar];
Code: Select all
$_GET['worksord']Mark
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
zenabi's first code line was intended to be inside an echo of sorts..
Code: Select all
echo '<a href="www.yourdomain.com/nextpage.php?var='.$worksord.'">Next Page</a>';-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
I didn't know they were adding "worksord" to the predefined constants soon, thats good to know.Bech100 wrote:Actually, retrieve it like thiszenabi wrote:Code: Select all
$_GETїvar];
Please read Array do's and don'ts - Why is $foo[bar] wrong? for explanation.Code: Select all
$_GET['worksord']
Mark