Jump to content


Photo

PHP drop down menu

php drop down menu mysql pdo


  • Please log in to reply
3 replies to this topic

#1 skygremlin

skygremlin

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 12 November 2013 - 12:42 PM

I've been looking at this for a bit and can't seem to figure what's going on?  I have used this code before and never had this issue....  I'm tryig to populate a dropdown menu from a MySql DB.  

 

The dropdown menu seems to skip the first array...  I attached a screenshot that hopefully show's what I'm talking about..

 

any thoughts?

 

 

Attached Files



#2 mac_gyver

mac_gyver

    Advanced Member

  • Moderators
  • 1,878 posts

Posted 12 November 2013 - 12:50 PM

your <select tag is missing the closing > so everything up to the first > is part of the <select tag.


multi-purpose programming fool and resident naysayer [We try not be negative in replies, but telling someone what they're doing wrong, while staying politically correct, isn't always going to happen.]

#3 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 1,690 posts

Posted 12 November 2013 - 12:51 PM

On line 26 of home.php you are not closing the select tag. This is how line 26 should read.

 

echo "<select name='cust_id'>";



#4 skygremlin

skygremlin

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 12 November 2013 - 01:43 PM   Best Answer

AHH.... thanx...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com