francis Aneke Posted April 21, 2014 Share Posted April 21, 2014 After fetching my data from the database, all of them were fetched correctly, but i want to parse all of them to the next page after storing them in an array for easy access on the next page ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// <?php $array = array( $index_id, $weekly_gen_news, $what_is_env, $things_in_env, $need_to_clean, $how_does_env, $african_env, $env_culture, $env_and_event, $cnn_env, $weekly_gen_news ); header("location: echo.php?GetArray=$array"); exit();?> ///////////////////////////////////////////////////////////////////////////////////////////////////////////// and when i parse them, i only see this on the url---->......./ echo.php?GetArray=Array i tried to get them using $_GET['GetArray'] but its not working Also how can i display the variables individualy Link to comment Share on other sites More sharing options...
Ingolme Posted April 21, 2014 Share Posted April 21, 2014 I would recommend storing the values in a session: session_start();$_SESSION['array'] = array( $index_id, $weekly_gen_news, $what_is_env, $things_in_env, $need_to_clean, $how_does_env, $african_env, $env_culture, $env_and_event, $cnn_env, $weekly_gen_news);session_write_close();header('Location: echo.php'); Read about sessions here: http://www.w3schools.com/php/php_sessions.asp Link to comment Share on other sites More sharing options...
francis Aneke Posted April 21, 2014 Author Share Posted April 21, 2014 but how can i output them individualy at the echo page using this SESSION Link to comment Share on other sites More sharing options...
Ingolme Posted April 21, 2014 Share Posted April 21, 2014 A session variable is the same as any other variable. What does echo.php currently have? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now