Submit to Hidden UL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CoolAsCarlito
Forum Contributor
Posts: 192
Joined: Sat May 31, 2008 3:27 pm
Contact:

Submit to Hidden UL

Post by CoolAsCarlito »

What I want to do is when Add is clicked after choosing a charactername then it drops down into a ul where each charactername would be put into a li and obviously more than one can be chosen. And until one is added then it says "This handler does not have any characters assigned."

Code: Select all

 
print'<h2 class="backstage">Characters<br /><br /><input type="hidden" name="action" value="handler"><input type="hidden" name="routine" value="addcharacter"><input type="hidden" name="option" value="0"><input type="hidden" name="id" value="0"><select name="characterid" class="dropdown">';
print'<option value="0">- Select -</option>';
$query = 'SELECT charactername FROM characters';
            $result = mysql_query($query);
            while ($row = mysql_fetch_assoc($result))
            {
            print "<option value=\"{$row['charactername']}\">{$row['charactername']}</option>\r";
            }             
print'</select>&nbsp;&nbsp;<input type="submit" value="Add" class="button" ></form></h2><br />';
print'This handler does not have any characters assigned.<br /><br />';
 
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Submit to Hidden UL

Post by josh »

Uh why not just write the whole string to a div? You could do this with a loop and assign each character by DOM index
Post Reply