passing data from one page to another


Posted on 16th Feb 2014 07:03 pm by admin

hey guys
i have the follwoing code to get information from one page and place on another:

(1st page) page to get info from:
Code: <?php session_start();
$_SESSION['data'] = "blah blah blah"; ?>

(2nd page) page to show info on:
Code: <?php session_start();
$data= $_SESSION['data'];?> // at top of page

<?php echo $data; ?>
i would like to use this code to show an error report, but the thing is that once the information has been called on the second page it stays there,
i would like it so if the page is reloaded the info will be reset/not show until the 1st page is loaded again.

can anyone help me please?

thanks everyone

No comments posted yet

Your Answer:

Login to answer
329 Like 28 Dislike
Previous forums Next forums
Other forums

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

TabControl Inside ListView Not Editing
Hello everybodyI have a ListView on my page. Inside the ListView I put a TabControl, cuz I want to p

PHP & Java
Hello,

can PHP code be used inside java code?

Code: <SCRIPT LANGUAGE="Java

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash