如何从php中的两个diffrant页面获取两个值 [英] how to get two values from two diffrant pages in php

查看:99
本文介绍了如何从php中的两个diffrant页面获取两个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,

我想从page1.php和page2.php获得两个值。
来自page1.php的
我想获得val1。从page2我想在main.php页面中获取val2。
在main.php中的
我想在文本框中绑定val1,在隐藏字段中绑定val2。

plz help。 ..

dear sir,
i want to get two values from page1.php and page2.php.
from page1.php i want to get val1. and from page2 i want to get val2 in main.php page.
in main.php i want to bind val1 in textbox and val2 in hidden field.
plz help...

推荐答案

查找php会话:使用


_SESSION变量。



有两个选项(和其他选项存在):

如果页面互相调用,则可以通过表单加载值并传递单页到另一个。或者,您可以使用AJAX加载会话变量



由于php是服务器端,这将需要某种类型的javaScript事件触发器。





_SESSION variables.

A couple of options (and others exist):
If pages call one another, the values can be loaded via a form and passed one-page-to-another. Or, you may use AJAX to load the session variable

Since php is serverside, this will require some sort of trigger by a javaScript event.



这篇关于如何从php中的两个diffrant页面获取两个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆