|
Posted by Rami Elomaa on 05/10/07 19:48
Bob Bedford kirjoitti:
> HI all,
> Weird problem....
>
> in the file queries.inc.php I've this:
> $query = 'select * from list where content = '.$idcontent;
>
> I've this code in my page:
> $idcontent = 15;
> require_once("queries.inc.php");
>
> The query fails: when I do echo the query I've:
>
> select * from list where content =
>
> The $idcontent isn't set in the include...why ? how to fix it ?
Just as a sanity test:
<?php
$foo ='bar';
require_once('echo.php');
?>
echo.php:
<?php echo $foo; ?>
Does the simplest possible test case like the one above work? If it
works, then the problem is not in including, but somewhere else. If it
doesn't, the latest version of php 4 is 4.4.7, you should upgrade to
that if there indeed is a problem related to passing variables to
included pages, which I highly doubt.
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Navigation:
[Reply to this message]
|