Page 1 of 1

[SOLVED] call another script automatically

Posted: Tue Nov 18, 2003 11:26 am
by jbatty
Just a quick one, please.

HOw do i call another PHP script at the end of script? I want the first script to hand over the the second automatically passing one variable on.

Thank you

Posted: Tue Nov 18, 2003 11:32 am
by vigge89
just create a php-file that has include("script.php");
at the end of it, and it will be executed automatic.
Example;
page.php:

Code: Select all

<?php

$var1 = "Something";

$somename = "Brian";

include(script.php");

?>
script.php:

Code: Select all

<?php

echo $var1

echo $name

?>
when you include something, you put everything in the file you include in the place you include it....

Posted: Tue Nov 18, 2003 11:56 am
by m3mn0n
[php_man]include[/php_man]()
[php_man]require[/php_man]()

Posted: Tue Nov 18, 2003 12:33 pm
by jbatty
Thank you all!

Posted: Tue Nov 18, 2003 12:57 pm
by vigge89
your welcome :)

Posted: Tue Nov 18, 2003 1:37 pm
by jbatty
Thank you all!

Posted: Tue Nov 18, 2003 1:39 pm
by m3mn0n
np ;)