查看: 1607|回复: 12
|
(PHP)要如何把variable 的value带到另一页?
[复制链接]
|
|
发表于 2-7-2007 12:27 PM
|
显示全部楼层
原帖由 城之内 于 2-7-2007 11:16 AM 发表 
除了用form之外还有其他方法吗?
SESSION ,COOKIE ,HTTP GET都可以 |
|
|
|
|
|
|
|

楼主 |
发表于 2-7-2007 02:10 PM
|
显示全部楼层
原帖由 max5007 于 2-7-2007 12:27 PM 发表 
SESSION ,COOKIE ,HTTP GET都可以
请问要怎么做呢? |
|
|
|
|
|
|
|
发表于 2-7-2007 04:29 PM
|
显示全部楼层
$_SESSION['abc'] = "hihi"; |
|
|
|
|
|
|
|
发表于 2-7-2007 05:30 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 2-7-2007 10:45 PM
|
显示全部楼层
$_SESSION['username']="Andy";
然后在另一个page.
$user=$_SESSION['username'];
*$user get the value of $_SESSION['username']
$user=Andy
Get it? |
|
|
|
|
|
|
|
发表于 2-7-2007 10:47 PM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 3-7-2007 08:55 AM
|
显示全部楼层
原帖由 阿有 于 2-7-2007 10:45 PM 发表 
$_SESSION['username']="Andy";
然后在另一个page.
$user=$_SESSION['username'];
*$user get the value of $_SESSION['username']
$user=Andy
Get it?
谢谢你!!!! |
|
|
|
|
|
|
|

楼主 |
发表于 3-7-2007 09:42 AM
|
显示全部楼层
请问为什么会出现error page的? code是可以跑,可是在status bar會有感嘆號... |
|
|
|
|
|
|
|
发表于 4-7-2007 09:00 AM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 4-7-2007 09:38 AM
|
显示全部楼层
原帖由 max5007 于 4-7-2007 09:00 AM 发表 
那通常是你的JS 问题
那要怎么办呢?? |
|
|
|
|
|
|
|
发表于 4-7-2007 02:30 PM
|
显示全部楼层
还能怎么办?当然是debug你的JS code lo |
|
|
|
|
|
|
|

楼主 |
发表于 4-7-2007 03:20 PM
|
显示全部楼层
原帖由 max5007 于 4-7-2007 02:30 PM 发表 
还能怎么办?当然是debug你的JS code lo
<script>
function popupWin() {
text = "<html>\n<head>\n<title>LuckyAutoSport</title>\n<body>\n";
text += "<center>\n<br>Welcome to LuckyAutoSport!!!<br>";
text += "<a href='http://www.luckyautosport.com/products_new.php?osCsid=a6cb5763bfae317d40ebedfe52254e1a' target='_blank'><h3>New Product of LuckyAutoSport</h3></a>";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text)', 2000); // delay 3 seconds before opening
}
function windowProp(text) {
newWindow = window.open('','newWin','width=300,height=100');
newWindow.document.write(text);
setTimeout('closeWin(newWindow)', 10000); // delay 5 seconds before closing
}
function closeWin(newWindow) {
newWindow.close(); // close small window and depart
}
</script>
有什么问题? |
|
|
|
|
|
|
| |
本周最热论坛帖子
|