evaluate php script and pass php variable to aother php
Posted: Fri Oct 28, 2005 7:38 pm
hello!
lets say php script is here http://abc.com/a.php
this a.php works with inner mysql database "localhost" etc.
after all it returns answer like
echo "<b>".$country."</b>";
which is lets say outputs html <b>UK</b>
when i go to http://abc.com/a.php
it is fine, it shows me what i want it shows value of $country = <b>UK</b>;
but the problem is how do i get this value of $country from another location
lets say URL is like http://xyz.com/b.php ?
include did not work i did something wrong there...
how to evaluate things in php and then pass to another php script?
.............
in javascript there is no problem, all you have to do is do like this
<script src="http://abc.com/a.php"> </script>
and in javascript working space would be <b>UK</b>, which ofcourse leads to an error, but it is not a point
lets say php script is here http://abc.com/a.php
this a.php works with inner mysql database "localhost" etc.
after all it returns answer like
echo "<b>".$country."</b>";
which is lets say outputs html <b>UK</b>
when i go to http://abc.com/a.php
it is fine, it shows me what i want it shows value of $country = <b>UK</b>;
but the problem is how do i get this value of $country from another location
lets say URL is like http://xyz.com/b.php ?
include did not work i did something wrong there...
how to evaluate things in php and then pass to another php script?
.............
in javascript there is no problem, all you have to do is do like this
<script src="http://abc.com/a.php"> </script>
and in javascript working space would be <b>UK</b>, which ofcourse leads to an error, but it is not a point