slpctrl Posted November 15, 2008 Share Posted November 15, 2008 Alright, I'm using PHP-Fusion (I know it should go in PHP applications probably, but I think the problem is probably easily spotted...I believe it to be a missing </div> but I can't find it. Anyways, here is the code: elseif ($_GET ['section'] == "options") { add_to_title ( " :: " . $locale ['uc110'] ); $user_data = $userdata; if (isset ( $_POST ['update_profile'] )) { $result = dbquery ( "SELECT * FROM " . DB_USER_FIELDS . " WHERE field_group='3' and field_name!='user_sig' ORDER BY field_order" ); $db_values = "user_name='" . $userdata ['user_name'] . "'"; if (dbrows ( $result )) { $profile_method = "validate_update"; while ( $data = dbarray ( $result ) ) { if (file_exists ( LOCALE . LOCALESET . "user_fields/" . $data ['field_name'] . ".php" )) { include LOCALE . LOCALESET . "user_fields/" . $data ['field_name'] . ".php"; } if (file_exists ( INCLUDES . "user_fields/" . $data ['field_name'] . "_include.php" )) { include INCLUDES . "user_fields/" . $data ['field_name'] . "_include.php"; } } } $result = dbquery ( "update " . DB_USERS . " set $db_values where user_id='" . $userdata ['user_id'] . "'" ); if ($result) redirect ( FUSION_SELF . "?section=options&status=updated" ); } if (isset ( $_GET ['status'] ) && $_GET ['status'] == "updated") { echo "<tr>\n<td class='tbl1' style='padding:20px; text-align:center; font-weight:bold;'>" . $locale ['uc345'] . "</td>\n</tr>\n"; } echo "<tr>\n<td class='tbl2 navtitle'>" . $locale ['uc110'] . "</td>\n</tr>\n"; echo "<tr>\n<td class='tbl1'>\n"; echo "<form action='" . FUSION_SELF . "?section=options' method='post' name='inputform'>"; echo "<div align='center'>\n<fieldset class='fields'>\n"; echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n"; include LOCALE . LOCALESET . "user_fields.php"; $profile_method = "input"; $result3 = dbquery ( "SELECT * FROM " . DB_USER_FIELDS . " WHERE field_group='3' and field_name!='user_sig' ORDER BY field_order" ); if (dbrows ( $result3 )) { while ( $data3 = dbarray ( $result3 ) ) { if (file_exists ( LOCALE . LOCALESET . "user_fields/" . $data3 ['field_name'] . ".php" )) { include LOCALE . LOCALESET . "user_fields/" . $data3 ['field_name'] . ".php"; } if (file_exists ( INCLUDES . "user_fields/" . $data3 ['field_name'] . "_include.php" )) { include INCLUDES . "user_fields/" . $data3 ['field_name'] . "_include.php"; } } } echo "</table>\n</fieldset>\n<input type='submit' name='update_profile' class='button' value='" . $locale ['uc342'] . "'>\n</form>\n"; echo "</td>\n</tr>\n"; /* User CP -> Settings -> Ignore List */ } This code is causing my DIVs to do this: Can anyone spot anything here I can't? This is driving me nuts :-\ Link to comment https://forums.phpfreaks.com/topic/132789-divs-are-off/ Share on other sites More sharing options...
Garethp Posted November 15, 2008 Share Posted November 15, 2008 I can only see one div in the code you sent <div align='center'>\n<fieldset class='fields'>\n Are you sure that's the exact part? Link to comment https://forums.phpfreaks.com/topic/132789-divs-are-off/#findComment-690584 Share on other sites More sharing options...
dropfaith Posted November 15, 2008 Share Posted November 15, 2008 okay the div did not have a close tag also your fieldset was inside your form fieldsets go around forms to my knowledge and they validate that way so i tweaked the code to reflect this and made the div hold the fieldset then the fieldset holds the form all close in order i didnt look for more errors cause i assme this will fix <?php elseif ($_GET ['section'] == "options") { add_to_title ( " :: " . $locale ['uc110'] ); $user_data = $userdata; if (isset ( $_POST ['update_profile'] )) { $result = dbquery ( "SELECT * FROM " . DB_USER_FIELDS . " WHERE field_group='3' and field_name!='user_sig' ORDER BY field_order" ); $db_values = "user_name='" . $userdata ['user_name'] . "'"; if (dbrows ( $result )) { $profile_method = "validate_update"; while ( $data = dbarray ( $result ) ) { if (file_exists ( LOCALE . LOCALESET . "user_fields/" . $data ['field_name'] . ".php" )) { include LOCALE . LOCALESET . "user_fields/" . $data ['field_name'] . ".php"; } if (file_exists ( INCLUDES . "user_fields/" . $data ['field_name'] . "_include.php" )) { include INCLUDES . "user_fields/" . $data ['field_name'] . "_include.php"; } } } $result = dbquery ( "update " . DB_USERS . " set $db_values where user_id='" . $userdata ['user_id'] . "'" ); if ($result) redirect ( FUSION_SELF . "?section=options&status=updated" ); } if (isset ( $_GET ['status'] ) && $_GET ['status'] == "updated") { echo "<tr>\n<td class='tbl1' style='padding:20px; text-align:center; font-weight:bold;'>" . $locale ['uc345'] . "</td>\n</tr>\n"; } echo "<tr>\n<td class='tbl2 navtitle'>" . $locale ['uc110'] . "</td>\n</tr>\n"; echo "<tr>\n<td class='tbl1'>\n"; echo "<div align='center'>\n<fieldset class='fields'>\n"; echo "<form action='" . FUSION_SELF . "?section=options' method='post' name='inputform'>"; echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n"; include LOCALE . LOCALESET . "user_fields.php"; $profile_method = "input"; $result3 = dbquery ( "SELECT * FROM " . DB_USER_FIELDS . " WHERE field_group='3' and field_name!='user_sig' ORDER BY field_order" ); if (dbrows ( $result3 )) { while ( $data3 = dbarray ( $result3 ) ) { if (file_exists ( LOCALE . LOCALESET . "user_fields/" . $data3 ['field_name'] . ".php" )) { include LOCALE . LOCALESET . "user_fields/" . $data3 ['field_name'] . ".php"; } if (file_exists ( INCLUDES . "user_fields/" . $data3 ['field_name'] . "_include.php" )) { include INCLUDES . "user_fields/" . $data3 ['field_name'] . "_include.php"; } } } echo "</table>\n<input type='submit' name='update_profile' class='button' value='" . $locale ['uc342'] . "'>\n</form>\n</fieldset>\n</div>\n"; echo "</td>\n</tr>\n"; /* User CP -> Settings -> Ignore List */ } ?> Link to comment https://forums.phpfreaks.com/topic/132789-divs-are-off/#findComment-690679 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.