What the...? Weird problem

Discussion in 'PHP' started by warsome, Apr 30, 2008.

  1. #1
    Alright, so, I use the following code:
    		echo '<form name="edit" method="post" action="manage_games.php">
    		Screenshot Url:<br />
    		<input type="text" name="screenshoturl" value="' . $row['screenshoturl'] . '"  /><br />
    		Game URL:<br />
    		<input type="text" name="gameurl" value="' . $row['gameurl'] . '"  /><br />
    		Game Name:<br />
    		<input type="text" name="name" value="' . $row['name'] . '"  /><br />
    		Owner Email:<br />
    		<input type="text" name="email" value="' . $row['email'] . '" /><br />
    		Approved: (yes or no)<br />
    		Category:<br />
    		<select name="category">';
    	$query = mysql_query("select * from categories");
    	while($row = mysql_fetch_array($query)) {
    		echo '<option value="' . $row['id'] . '">' . $row['name'] . '</option>';
    	}
    		echo ' <br />
    		<strong>Description:</strong><br />
    	        <textarea name="description">' . $row['description'] . '</textarea><br />
    		<input type="text" name="approved" value="' . $row['approved'] . '" /><br />
    		<input type="hidden" name="id" value="' . $row['id'] .'" />
    		<input type="submit" name="edit" value="Edit!" />
    		</form>
    		';
    PHP:
    Which is a form to manage games on an upcoming project of mine. Yet, I'm getting a weird problem:
    [​IMG]

    As you can see, the Category option is screwing everything up. I tried it without Category, and it worked fine.

    What am I doing wrong?
    (Where it says Description, the game name, and the Yes, i added all those via Paint. The Category box is really covering up the text that labels the Description box.)
    (Also, I know that I put the text that says "Approved? (Yes or No)" in the wrong place, but that isn't the problem)
     
    warsome, Apr 30, 2008 IP
  2. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #2
    You forget to close your <select> tag :)
     
    xrvel, Apr 30, 2008 IP
    warsome likes this.
  3. warsome

    warsome Guest

    Messages:
    500
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Oh. Whoops. :p I suck at checking if I closed tags.

    Thanks!~
     
    warsome, Apr 30, 2008 IP