Jump to content

PARSING VARIABLES WITH ARRAY


francis Aneke

Recommended Posts

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

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

but how can i output them individualy at the echo page using this SESSION

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...