将值传递到php中的下一页 [英] Pass a value to the next page in php
问题描述
任何人都可以帮助我...
我已经创建了此代码以传递值,但它仍返回0到下一页...我错过了一些代码还是我写错了代码....
在第一页中,我将值一个传递给了下一页.
anybody can help me please...
i had create this code to pass the value but it still return 0 to the next page...did i miss some code or i wrote the code wrong....
in the first page i had pass value one to next page..
<a href="kenal2.php?count=1"></a>
在第二页中,我检索了值一,并在值中加上了1 ...
在第二页的首页中.
in the second page i had retrieve the value one and i had add the value with 1...
in the top page of the second page..
if (isset($_GET[''count'']))<br />
$count = $_GET[''count''];<br />
else<br />
$count = 0;<br />
?>
在第二页底部...我已经使用该值进行了一些计算
at the bottom of the second page...i had done some calculation with the value
<?php echo $count;<br mode="hold" /?> $sum = $count + 1;
?>
所以我想将$ sum值传递给第三页...
so i want to pass the $sum value to the third page...
<a href="kenal3.php?count = $sum"></a>
在第三页的顶部...
in the top of third page...
if (isset($_GET[''sum'';]))
$sum = $_GET[''sum''];
else
$sum = 0;
?>
当我尝试显示值时...应该显示2但显示的值为0 ..似乎无法从第二页检索值...
为什么会这样...
when i try to show the value...it should come out with 2 but value 0 that had been show..seem that it could not retrieve the value from second page...
why this happen...
推荐答案
_GET [''count''])))< br/>
_GET[''count'']))<br />
count =
_GET [''count''];< br/> else< br/>
_GET[''count''];<br /> else<br />
这篇关于将值传递到php中的下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!