Jump to content

passing variables accross PHP scripts HELP Please


thegadgitman

Recommended Posts

I have a few pieces of script that have to interact with each other.

The 1st script makes up some variables and these have to be passed

to other scripts.

I am having problems getting them into the other script.

 

Say  Script1.php  makes variables  $a1  $a2 $a3

 

Srcipt2.php needs to read these indipendantly of script1.php

 

Any help would be great.

 

I do know the post and get commands but dont seem to be able to get them

to work.

 

An example would be great.

 

THANKS.

You would need to let us know what the interaction between the scripts is.

 

does one call the other?

is a form involved?

 

Other then that, your best solution is to use sessions where in both scripts you start with session_start();  and in one you say $_SESSION['a'] = $a; and in the other you say $a = $_SESSION['s'];

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.