You are here: Re: Calling a Function inside the SendMail « PHP Programming Language « IT news, forums, messages
Re: Calling a Function inside the SendMail

Posted by Martyr2 on 04/11/06 23:39

Remember that variables inside a function like this are treated as
local variables unless specified by the "global" keyword. Since I don't
see you defining the variable $lang in your function, it is empty and
thus no message is returned.

Fix - Either define the $lang as "global" in the function (that is if
$lang is defined outside the function) or the better way is to be sure
to pass the $lang variable as a parameter to this function.

Here is a resource link to what I am talking about... it is a variable
scoping issue I am guessing from what I see there.

http://ca.php.net/manual/en/language.variables.scope.php

Hope this helps :)

 

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

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