|
Posted by Peter van Schie on 10/25/29 11:22
julian_m wrote:
> Will pagecalled.php "see" both $argument1 and $argument2? How?
Yes, because include() basically just inserts the code from
pagecalled.php at the position of the include call. Therefore the
$argument1 and $argument2 variables are available to the code in
pagecalled.php if you set them like this.
> If so, why do we use this way: pagecalled.php?argument1=x&argument2=x?
> Is it just an option to do the same?
No, it's not the same. You're talking about the HTTP GET method to send
data to a script from a html form, for instance data a user submitted
using a html form.
In your case you just want to be able to use php variables in a php
script you include from another php script.
--
http://www.phpforums.nl
Navigation:
[Reply to this message]
|