--- Marc Henri <[EMAIL PROTECTED]> wrote: > It reads a MySQL table with many variables and print > the information in a table generated by my PHP code. > The table has more or less rows depending of the > amount of data in the MySQL table. > It works perfectly. But if the table is empty, then, I > have this error: > "Undefined variable: myvariable in path on line 80". > > I changed the variable with another one and the result > is the same, same error. > The table appears correctly in the browser, it is > empty, but I have this error message. > Why only one variable gives me this error message and > not each of them, as they are all empty? > And why do I have this error? > > Did one of you already meet this problem?
There are several levels of messages from PHP. This one is a warning, not an error, but your installation of PHP is showing warnings. You can get around it by defining the variable at the top of your program: $myvariable = 0; or $myvariable = ""; When you redefine the value from your SQL statement, it will replace the value given to the variable initially. James _____ James D. Keeline http://www.Keeline.com http://www.Keeline.com/articles http://Stratemeyer.org http://www.Keeline.com/TSCollection http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. Summer Semester Begins Jun 20 -- New Classes Start Every Few Weeks. Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
