var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Stored array into dropdown
I have array data that was previously stored like so:
Now, I would like to populate a dropdown list with this array data. Here is what I have tried:
$query = "INSERT INTO users VALUES ('$userTeam')";
The dropdown gets populated, but as one long string as a single item. I tried exploding the data, but nothing shows. Can anyone point me in the right direction?
<select name="teamList" id="teamList">
$query = "SELECT userTeam FROM users WHERE fullName='Tim Schutz'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
echo '<option value="' . $row['fullName'] . '">' . $row['userTeam'] . '</option>';
Originally Posted by Tim Schutz
Do I understand you correctly ...
You've stored the value 'SF','CHI','CIN' into a table and now you're confused when you select the data from this table and it returns the value 'SF','CHI','CIN'.
Can I suggest you store the values separately and that you perhaps read up on normalisation