Streetdaddy
Programmer
i'm *very* new to php, so please tell me if the following should work:
inc.php
<?php
function go() {
session_start();
session_register("test"
$test = "hello world";
echo "output from inc.php - $test<br>";
}
?>
file.php
<?php
include 'inc.php';
go();
echo "output from file.php - $test<br>";
?>
file.php gives the output:
output from inc.php - hello world
output from file.php -
Is there some simple reason why file.php can't output $test? I mean, is it something simple in the code or is it a config issue? Any help appreciated...
Miles
Those Micros~1 guys sure know what they doing!
inc.php
<?php
function go() {
session_start();
session_register("test"
$test = "hello world";
echo "output from inc.php - $test<br>";
}
?>
file.php
<?php
include 'inc.php';
go();
echo "output from file.php - $test<br>";
?>
file.php gives the output:
output from inc.php - hello world
output from file.php -
Is there some simple reason why file.php can't output $test? I mean, is it something simple in the code or is it a config issue? Any help appreciated...
Miles
Those Micros~1 guys sure know what they doing!