Click here to Skip to main content
15,886,362 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: More of a poll than a question... Pin
jschell14-Apr-11 9:52
jschell14-Apr-11 9:52 
GeneralRe: More of a poll than a question... Pin
Albert Holguin14-Apr-11 10:03
professionalAlbert Holguin14-Apr-11 10:03 
GeneralRe: More of a poll than a question... Pin
jschell15-Apr-11 8:58
jschell15-Apr-11 8:58 
Generaladd and show events on a calender in php/msql problem Pin
tryingmybest894-Apr-11 12:36
tryingmybest894-Apr-11 12:36 
GeneralRe: add and show events on a calender in php/msql problem Pin
Graham Breach5-Apr-11 0:16
Graham Breach5-Apr-11 0:16 
GeneralRe: add and show events on a calender in php/msql problem Pin
tryingmybest896-Apr-11 12:31
tryingmybest896-Apr-11 12:31 
GeneralRe: add and show events on a calender in php/msql problem Pin
Mutinda Boniface15-Apr-11 3:53
Mutinda Boniface15-Apr-11 3:53 
QuestionHow to know if a variable has been initiated or not [modified] Pin
Joan M30-Mar-11 7:56
professionalJoan M30-Mar-11 7:56 
Hello again,

I'm trying to handle the language setting from the user. For that I've created a variable that I'm using in all the PHP files I have: $MyLangVar.

I would like to assign a default value to that variable to i.e. english.

So I've done this in my initialize file (a file that is being included by all the other files in the web site):

<?php	
  include($_SERVER['DOCUMENT_ROOT'].'/important_file_for_all.php');  // that file is not using the $MyLangVar variable.

  // first attempt.
  /*
  if (!isset($MyLangVar))
  {
    $MyLangVar= "English";
  }
  */
  // second attempt
  if (!isset($GLOBALS['MyLangVar'])
  {
    $MyLangVar = "English";
  }
?>


Both attempts have not worked properly IN THE 404.PHP PAGE.

At the beginning of each file I have this line: $MyLangVar = $GLOBALS['MyLangVar'];

How should I do this?

Thank you in advance.
[www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.
modified on Wednesday, March 30, 2011 2:16 PM

AnswerRe: How to know if a variable has been initiated or not Pin
nickmaroulis30-Mar-11 13:35
nickmaroulis30-Mar-11 13:35 
GeneralRe: How to know if a variable has been initiated or not Pin
Joan M30-Mar-11 20:25
professionalJoan M30-Mar-11 20:25 
GeneralRe: How to know if a variable has been initiated or not Pin
nickmaroulis30-Mar-11 21:03
nickmaroulis30-Mar-11 21:03 
GeneralRe: How to know if a variable has been initiated or not Pin
nickmaroulis30-Mar-11 21:18
nickmaroulis30-Mar-11 21:18 
GeneralRe: How to know if a variable has been initiated or not Pin
Joan M30-Mar-11 21:41
professionalJoan M30-Mar-11 21:41 
GeneralRe: How to know if a variable has been initiated or not Pin
User 171649230-Mar-11 22:28
professionalUser 171649230-Mar-11 22:28 
GeneralRe: How to know if a variable has been initiated or not Pin
Joan M30-Mar-11 22:51
professionalJoan M30-Mar-11 22:51 
QuestionProblem with pointers / permissions? Pin
whatsa25-Mar-11 10:15
whatsa25-Mar-11 10:15 
AnswerRe: Problem with pointers / permissions? Pin
cjoki25-Mar-11 13:31
cjoki25-Mar-11 13:31 
AnswerRe: Problem with pointers / permissions? Pin
effayqueue25-Mar-11 23:50
effayqueue25-Mar-11 23:50 
AnswerRe: Problem with pointers / permissions? Pin
nickmaroulis30-Mar-11 13:38
nickmaroulis30-Mar-11 13:38 
Questionhow to bypass web filter Pin
yftah198923-Mar-11 7:12
yftah198923-Mar-11 7:12 
AnswerCross Post: Please Ingore Pin
Keith Barrow23-Mar-11 8:48
professionalKeith Barrow23-Mar-11 8:48 
GeneralRe: Cross Post: Please Ingore Pin
Pete O'Hanlon23-Mar-11 9:21
mvePete O'Hanlon23-Mar-11 9:21 
GeneralRe: Cross Post: Please Ingore Pin
Keith Barrow23-Mar-11 9:44
professionalKeith Barrow23-Mar-11 9:44 
Questionsend data Pin
Elham M23-Mar-11 3:19
Elham M23-Mar-11 3:19 
AnswerRe: send data Pin
cjoki23-Mar-11 4:32
cjoki23-Mar-11 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.