开发者

Multiple values in session [closed]

开发者 https://www.devze.com 2023-02-21 17:49 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I have three text boxes named as phoneno 1, 2, 3. I want get through session and stored in one value. If I echo stored value the three values of txt boxes should echo'd. How to do this?

$_SESSION['pno1'] = $_POST['pno1'];
$_SESSION['pno2'] = $_POST['pno2'];
$_SESSION['pno3'] = $_POST['pno3'];
$_SESSION['ext'] = $_POST['ext'];

I mean these all values are 开发者_StackOverflowstored in $phonenumer how do.


Its very unclear what you're asking. I will take a stab at it:

You had a form, you've entered a phone number in 3 text boxes You have the variables pno1, 2 and 3.

You now want a phone_number variable, and to store that in the session.

how about

$_SESSION['phone_number']=$_SESSION['pno1']." ".$_SESSION['pno2']." ".$_SESSION['pno3']." (".$_SESSION['ext'].")";

Is this what you've asked?

0

精彩评论

暂无评论...
验证码 换一张
取 消