Topic: Checkbox
well im currently creating a new checkbox in profile.php under display. What this checkbox is for is the display of my newsbox on my forum index.
So far i have created a new feild under the users table and named it "show_newsbox" and then i set it up in profile.php., but it seems that it doesnt stick to the default value nor switch to a different value when checked......in other words you cant check the box.....is there any suggestions for this?
This is the checkbox i stored in profile.php jsut after the show_img checkbox
<label><input type="checkbox" name="form[show_newsbox]" value="1"<?php if ($user['show_newsbox'] == '1') echo ' checked="checked"' ?> /><?php echo 'Show Newsbox'; ?><br /></label>
Here is the line that collects it from the database. Look for u.show_newsbox
$result = $db->query('SELECT u.id, u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.notify_mp, u.use_pm, u.popup_pm, u.show_smilies, u.show_img, u.show_newsbox, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());