Multiple values in session [closed]
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?
精彩评论