Looks like you have a scope issue :
$a = 'foo';
function bar()
{
$a = 'bar';
}
bar();
print $a; // prints foo
outside of the function, $a has not been affected. want it to be? then
try something like :
$a = 'foo';
function bar()
{
global $a;
$a = 'bar';
}
bar();
On Tue, 24 Apr 2001 12:57, Martin Skjöldebrand wrote:
> I have a function on an include page that says
>
> function update_stuff($database)
> {
> include("includes/connect.inc.php");
> include("config/db.conf.php");
> $query="SELECT * FROM $database";
> $query_res=mysql_query($query, $mysql_link);
2 matches
Mail list logo