ondi Posted December 29, 2008 Share Posted December 29, 2008 Hi, here's my code, and things are working as they should. My only problem is I can't seem to move my drop-down list from the cell it is in to the cell left one. (see photo) Can anyone see from my code whats going wrong? Site url: http://www.walthamforest-fc.co.uk/stats/newplayer.php?id=3 <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR VALIGN=middle ALIGN=center> <td><img src="http://www.walthamforest-fc.co.uk/stats/images/playerbar.jpg"></TD> </TR> <tr VALIGN=left ALIGN=center> <td><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . "_1.jpg"; ?>"/><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . ".jpg"; ?>"/> </td></tr> <tr> <td background="/stats/images/playernameback.jpg" width="308" height="46"> <font face="Arial" size="4"><span style="letter-spacing: 0pt"><font color="#018609"> <?php echo "$playerdata[firstname]" ?> <?php echo "$playerdata[lastname]" ?> </TD> <td> <td background="/stats/images/playernameback.jpg" width="202" height="46"><?php // //Haetaan kaikki pelaajat dropdownia varten // $sql = ' SELECT P.PlayerID AS id, P.PlayerLastName AS lastname, P.PlayerFirstName AS firstname, P.PlayerPublish AS publish FROM tplss_seasons S LEFT OUTER JOIN tplss_players P ON P.PlayerID = S.SeasonPlayerID '; if($defaultseasonid == 0) { $sql .= " WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } else { $sql .= " AND S.SeasonID = '$defaultseasonid' WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } $query = mysql_query("$sql", $connection) or die(mysql_error()); echo"<select name=\"playerid\">"; while($data = mysql_fetch_array($query)) { if($data['id'] == $id) { echo"<option value=\"$data[id]\" SELECTED>$data[firstname] $data[lastname]</option>\n"; } else { echo"<option value=\"$data[id]\">$data[firstname] $data[lastname]</option>\n"; } } echo"</select> <input type=\"submit\" name=\"change_player\" value=\"$txt_change\">"; mysql_free_result($query); $ttl = (($_SESSION['getAdditional'] + 1) % 2) ? "Show": "Hide"; ?> </td> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/138735-problems-with-table-cells/ Share on other sites More sharing options...
ToonMariner Posted January 1, 2009 Share Posted January 1, 2009 OK - using tables for layout is the old school method and I find it impossible to 'help' people with problems with table based layouts - I don't believe it helps anybody... this applies to you too - I will however point you to using some markup validation - that wlll help initially. Quote Link to comment https://forums.phpfreaks.com/topic/138735-problems-with-table-cells/#findComment-727394 Share on other sites More sharing options...
htmlstig Posted January 1, 2009 Share Posted January 1, 2009 </TD> <td> <td background="/stats/images/playernameback.jpg" width="202" height="46"><?php is that <td> needed as there is no closing </td>? Quote Link to comment https://forums.phpfreaks.com/topic/138735-problems-with-table-cells/#findComment-727615 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.