when you call the 2nd script, new.php, call it like this:
new.php?sign=$data
that is one way to pass it ... or you can keep the variable hidden by using
sessions
1. xmlparse.php
-------------------------------
session_start(); // start a session
session_register("data"); // register 'data' as a session var
$data = "whatever"; // assign a value
---------------------------------
2. now going on to the next script: new.php
---------------------------------
session_start(); // start a session
$sign = $data; // $data should already have the value previously assigned;
since it's in session, the value carries over
echo $sign; // should display "whatever"
-------------------------------------------
try that.
also, you can try doing this in your original example:
<snip>
new.php
include('xmlparse.php')
global $data; // add this line; do a "global" to make sure you
grab the $data var
$sign = "$data";
echo "$sign";
</snip>
Goodluck!
Nicole Amashta
www.aeontrek.com
========================
"Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> hi all,
>
> I have a variable in a file called xmlparse.php called $data. $data stores
> in it an output returned by another php script..
>
> I need to pass this variable $data now into yet another php file say
new.php
> ..
>
> xmlparse.php
>
> $data = "blah blah";
>
> --------------------------------------------------------------------------
--
> ----
> new.php
>
> include('xmlparse.php')
>
> $sign = "$data";
>
> echo "$sign";
>
> But my echo "$sign"; is NOT printing anything.. Whats wrong here??
>
> TIA,
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]