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:
Did you know?Explore Trending and Topic pages for more stories like this.
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

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

Remove Rows From Database ad
Hi All,

I have this:

Code: [Select]<?php
session_start();
include('../com

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

ALV List Display to point to another report on Double Click
Hi,

I want my ALV List Display to point to another report on Double Click on its line ite

Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.
I wrote this code for a PHP calendar as an

Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

Stopping page post back
I have few literal contriols in my page and a repeater too. But inspite of using update panel, postb

Echoing a Variable from a Object
How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

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