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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.