Jump to content

variable passing


tcorbeil

Recommended Posts

Ok.. run into a new problem...  I have a page that calls an external script for processing and I need a variable from the main page to be available in the external script..

 

Is there a way to pass a variable from the main page into the external script? Or if not, is there a way to make the variable global os something?

 

Thanks.

T.

Link to comment
Share on other sites

That variable SHOULD be available....

 

if you have

 

$myVariable = "test";

include("/print_test.php");

 

and if print_test.php is > echo $myVariable;

 

It should print it out. Not sure why their is an issue here. Just make sure the call is after it.

 

Try looking into functions if it is causeing problems and pass it to the function if needed.

Link to comment
Share on other sites

It seems that most instances where I have seen variables passed were from HTML script (eg href="script.php?myvalue")to another page.. I gues in my situation I'm looking to pass a variable from a php script .. is this maybe why I am not getting anywere? In my previous post, you will see how I am trying to pass the varible.. maybe this is not possible?

 

Thanks.

T.

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.