I havn't checked it out and i don't know much about php with frames. I think the easyest way to pass the variable between frames would be to uses a session. It would look something like this. Usualy you are better of not using frames at all.
<?php
// frame1
session_start();
$text1 = 'some string';
// when registering pass the name of the variable as a string
// not the actual variable
session_register( 'text1' );
?>
<?php
// frame2
session_start();
// this is just like the session_register() function in that you
// use the varible name as a string not the actual varaible
// identifier
$text1 = HTTP_SESSION_VARS['text1'];
?>