Jump to content

Autofill Drop Down List


mikebyrne

Recommended Posts

the code as posted works perfectly for me. that leaves only a few possibilities:

 

1. Your connection to the database is failing

2. There is no table Products and/or no column ProductName

3. There are no records in the table Products and/or no values inserted for ProductName

 

I suggest that you first ensure error_reporting is on by creating an error (try dividing something by zero). If you can verify that error_reporting is on, then check your HTML output using View Source, as the error may be embedded in the <SELECT> and not displayed on the page.

I viewd the html page source and noticed this

 

Table 'admin.products' doesn't exist

 

UNBELIVABLE!!! 2 days pulling my hair out and my SQL was $query = "SELECT ProductName FROM Products"; instead of $query = "SELECT ProductName FROM Product";

 

Thanks for the help guys

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.