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.

Link to comment
Share on other sites

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'];

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.