开发者

Displaying the values stored in a session(using php) into a field

Here's the situation,

I created 6 pages,each of which has some text fields.I stored the values entered in these text fields in php sessions.now after the user fills up these text fields,he will be going to a confirmation page,where he will be verifying the details 开发者_开发问答and then the values are submitted.

Now in this confirmation page is there a way where we could display the data entered by the user(this data is retrieved from the session) in something like a label or someother field.I donot want to use a textbox for populating this data.

Any Suggestions will be useful.Thanks in advance.


How about something simple like this

<h2>Info you entered</h2>
First Name: <?php echo $_SESSION["first_name"]; ?>
<br />
Last Name: <?php echo $_SESSION["last_name"]; ?>


I'm not sure if I exactly understand, but you can pretty much get the data directly from the session via:

 $_SESSION['myvar']

within a php page you can just use this within a label, example:

<div><?= $_SESSION['myvar'] ?></div>

where the above is just the label.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜