Re: include() Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is the "echo $mySQL_user;" inside of a function?  I believe you'll
need to say "global $mySQL_user;" to gain access to it if so.


On 29 May 2013 12:39, Ron Piggott <ron.piggott@xxxxxxxxxxxxxxxxxx> wrote:
>
> Good morning all:
>
> I have recently purchased a computer and am using it as a dedicated server.  A friend helped me install PHP and configure.  I am saying this because I wonder if using a newer version of PHP (compared to my commercial web host) may be the reasoning behind the error I am receiving.
>
> I created a function to generate a form submission key.
> - This created hidden variable for forms
> - This is also session variable
>
> With this function I have an ‘ include ‘ for the file containing the mySQL database, username and password.  I know this file is being accessed because I added:
>
> ===
> echo $mySQL_user;
> ===
>
> following the login credentials.
>
> But when I remove this line from mySQL_user_login.inc.php and place within the function on the line following the include the "echo” returns nothing.
>
> ===
> include("mySQL_user_login.inc.php");
>
> echo $mySQL_user;
> ===
>
> Can any of you tell me why this is happening?
>
> Ron Piggott
>
>
>
> www.TheVerseOfTheDay.info

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux