Jump to content

ebaretta

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ebaretta's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Figured it out... moved the stuff over to the name tag and it works perfect... must have been tired when i was typing this up last night... Thanks
  2. $pic_id is the id of the pic that is pulled from the database so that once the form is submitted it will be able to distinguish which ones go where for which pic... Here i'm pulling the pic_id out just to give the radio button array a unique name automatically without me having to use other coding... each pic has the option of being inside, outside or a blueprint picture(but only one of these options) also out of all the pictures only 1 in the whole group can be a default picture. so basically if you have 3 picutes 1 will be default and maybe the other two are inside picutes but once i submit the information into the file i will need to distinguish between which ones are inside and which are outside and which are blue prints and which one is default. (this is usually done with about 10 pictures or so.) and yes your right about the name field... My main concern is when i pull up the page nothing is "checked" right. However if i look at the source code everything that is suppose to be checked is checked in the code... that is in every browser.. ie, firefox, opera, safari...
  3. <?php while ($row=mysql_fetch_assoc($result) { <?php if ($row['sub_cat'] == '1') { ?><label><input name="Default" type="radio" id="Default[]" value="1" checked="checked" /> Default</label><br /><?php } else { ?><label><input name="Default" type="radio" id="Default[]" value="1" /> Default</label><br /><?php } if ($row['sub_cat'] == '2') { ?><label><input type="radio" name="sub_cat" value="2" id="<?php echo $pic_id.'sub_cat[]';?>" checked="checked"/> Inside</label><br /><?php } else { ?><label><input type="radio" name="sub_cat" value="2" id="<?php echo $pic_id.'sub_cat[]';?>"/> Inside</label><br /><?php } if ($row['sub_cat'] == '3') { ?><label><input type="radio" name="sub_cat" value="3" id="<?php echo $pic_id.'sub_cat[]';?>" checked="checked"/> Outside</label><br /><?php } else { ?><label><input type="radio" name="sub_cat" value="3" id="<?php echo $pic_id.'sub_cat[]';?>"/> Outside</label><br /><?php } if ($row['sub_cat'] == '4') { ?><label><input type="radio" name="sub_cat" value="4" id="<?php echo $pic_id.'sub_cat[]';?>" checked="checked"/> Blue Print</label><br /><?php } else { ?><input type="radio" name="sub_cat" value="4" id="<?php echo $pic_id.'sub_cat[]';?>"/> Blue Print</label><br /><?php } ?> <?php } ?> All this does is create the table structure for each row called sets the one that is suppose to be default to default. However in the other 3 radio buttons (Inside, Outside, and BluePrint) only the last table has the correct one checked. I reviewed over the source code and it had all the ones checked that was suppose to be checked yet it did not show up in the page. I have tried every combination i can think of in order to get it to work. $pic_id calls a number so the id for the radio buttons looks like id="8sub_cat[]", id="9sub_cat[]" for each individual table.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.