Page 1 of 1
Simple button
Posted: Fri Jul 16, 2004 5:17 am
by dave_c00
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
Posted: Fri Jul 16, 2004 5:33 am
by zenabi
Use something like this:
Code: Select all
<a href="www.yourdomain.com/nextpage.php?var=$worksord">Next Page</a>
On nextpage.php retrieve the variable by using:
Posted: Fri Jul 16, 2004 5:38 am
by JayBird
Actually, retrieve it like this
Please read
Array do's and don'ts - Why is $foo[bar] wrong? for explanation.
Mark
Posted: Fri Jul 16, 2004 5:51 am
by dave_c00
My variable $worksord has a value but when i do this the it goes across as $worksord... Do i put speech marks around it??
Posted: Fri Jul 16, 2004 5:54 am
by feyd
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>';
Posted: Fri Jul 16, 2004 6:01 am
by dave_c00
thanks!!
Posted: Fri Jul 16, 2004 8:10 am
by d3ad1ysp0rk
I didn't know they were adding "worksord" to the predefined constants soon, thats good to know.

jk
Posted: Fri Jul 16, 2004 8:27 am
by JayBird
LiLpunkSkateR wrote:I didn't know they were adding "worksord" to the predefined constants soon, thats good to know.

jk
Eh?
