佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1607|回复: 12

(PHP)要如何把variable 的value带到另一页?

[复制链接]
发表于 2-7-2007 11:16 AM | 显示全部楼层 |阅读模式
除了用form之外还有其他方法吗?
回复

使用道具 举报


ADVERTISEMENT

发表于 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 | 显示全部楼层
$_GET['xyz']='hoho'
回复

使用道具 举报

发表于 2-7-2007 10:45 PM | 显示全部楼层
$_SESSION['username']="Andy";
然后在另一个page.
$user=$_SESSION['username'];

*$user get the value of $_SESSION['username']

$user=Andy



Get it?
回复

使用道具 举报

Follow Us
发表于 2-7-2007 10:47 PM | 显示全部楼层

回复 #6 阿有 的帖子

别忘了。。
session_start();
回复

使用道具 举报

 楼主| 发表于 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?


谢谢你!!!!
回复

使用道具 举报


ADVERTISEMENT

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

使用道具 举报

发表于 4-7-2007 09:00 AM | 显示全部楼层
那通常是你的JS 问题
回复

使用道具 举报

 楼主| 发表于 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>

有什么问题?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 13-9-2025 10:37 AM , Processed in 0.125167 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表