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

Weird problem with SELECT command..Help!
Hi!

It seems I'm having a really weird problem with SQL SELECT command....I have table into a

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

DBCA Templates
Hi all,

I'm working on creating a template for DBCA, but can't find any documentation on the

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

asp authentication problem
Hello all, I want to use the asp authentication (from asp.net configuration) in my web site. there

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

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