Jump to content

How do you sen an array to another script?


onemind

Recommended Posts

serialize it:
$errors = serialize($errors);

then when you retrieve the errors unserialize, them:
$errors = unserialize($_GET['errors']);

However Id suggest you use a cookie/sessions instead rather then sending the errors through the url.
Any pages you use $_SESSION start it off with session_start().  Then you can use variables across scripts.  So on script 1 you can store the array in say $_SESSION['errors'] = $errors;  Then on script 2 you can recall it simply by using the $_SESSION['errors'] variable.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.