Re: include problem

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

 



On Thu, May 4, 2006 1:46 pm, Jef Sullivan wrote:
> I have set a variable and building a string that will be used later in
> my php file.
>
> The string is a table. Within this table I want to call another php
> file
> using include for a
>
> pulldown menu. The problem is the included file is not showing its
> information. Snippets
>
> are provided below...

> Suggestions?

#1. Use "View Source" in your browser to see what you REALLY have as
HTML.

#2. Put something stupidly simple at the beginning and end of the
include files that are giving you trouble.

#3. Review your <?php echo include_path();?> and check for duplicate
filenames in other directories...  Maybe you ain't including the file
you THINK you are including. :-^ [Been there.]

#4. Comment out all the code that isn't relevant to the problem -- Few
readers of this list will wade through it in any detail anyway.

#5. Add var_dump($payment_type_rs); var_dump($payment_type); the line
after each of those variables first appears in your code.  The most
LIKELY explanation is that your get_payment_types() function is
returning an array or an empty result set or whatever. [Can't tell as
that's the one bit of source not provided.]

#6.
If you are not using set_error_handler, then you need to, or you need
to add a LOT of error-checking code.
Even if $payment_type_rs is a valid MySQL result, you CANNOT guarantee
that your database server won't go down before / while you are trying
to call mysql_fetch_assoc() and that function COULD error out.
It's your job to prepare for that possibility in some fashion.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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