You are here: variable in include « PHP Programming Language « IT news, forums, messages
variable in include

Posted by Bob Bedford on 05/10/07 15:33

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 ?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация