At 19.06.2001 09:21, you wrote:
>Hello
>I have a query that I have placed in a function that is in a file that I
>"include" in the page to be displayed. It doesn't work. I know that the code
>works because when I place the code in the page to be displayed directly it
>works fine.
>
>I can't figure it out. Thanks in advance for any help.
>John
>
>Here is the function contained in lib.inc:
>function type_select()
>{
>    $connection = mysql_connect($server, $user, $pass);

are $server, $user and $pass global variables?
If not, they wouldn't be available inside the function and you'd either 
have to make
them global, or pass them to the function.

That could explain why you can't connect...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
         Here and now, as opposed to fake time, which only occurs there
and then.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to