Jump to content

historykat

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by historykat

  1. I have a section of check boxes that load into a form if certain conditions are met. I can not make them retain their data if there are any errors in the rest of the form. The html that loads is: Joseph Ribkoff <input type="checkbox" name="keydesigners[]" value="Joseph Ribkoff" /> Tribal <input type="checkbox" name="keydesigners[]" value="Tribal" /> French Dressing <input type="checkbox" name="keydesigners[]" value="French Dressing" /> LaFie-Nier <input type="checkbox" name="keydesigners[]" value="LaFie-Nier" /> Ravel <input type="checkbox" name="keydesigners[]" value="Ravel" /> Maggy London <input type="checkbox" name="keydesigners[]" value="Maggy London" /> London Times <input type="checkbox" name="keydesigners[]" <value="London Times" /> It loads into a much larger form using the post method. I would put it all down, but it is humongous. The data posts just fine, but if there is an error and the page reloads, the rest of the form keeps it's data just fine by echoing the post data, but I can not figure out how to get the check boxes to stay checked or unchecked, depending. I have googled this a bunch and most the methods don't work at all, a few even kill my whole script. The only one that I have seen that does anythin in the right direction is this foreach construct I read on some random forum, but it checks all the boxes even if only one was checked. The foreach was like this: foreach ($keydesigners as $ch) { if ($ch='on') { $checked = 'checked '; } else { unset ($checked); } } And of course I stuck a php block in each input as such: <input type="checkbox" name="keydesigners[]" <?php echo $checked; ?>value="Joseph Ribkoff" /> What am I doing wrong? I have looked all over and I can't seem to find a solution that works. Thanks for reading this whole behemoth. Kat
  2. On a MacBook Pro running 10.7 firefox 6.0.2: safari 5.1: chrome 13: opera 11.51: Same story on each. Good luck!
  3. I am very new to this, so sorry if its a silly question. I have a php page with nothing but php for validating and sending email. I have included the actual html with a php include. I thought it was best to leave out all the html on a page that is just php. I am getting 3 errors when I try to validate the page: end of document in prolog [XHTML 1.0 Transitional] DOCTYPE Override in effect! [XHTML 1.0 Transitional] No Character encoding declared at document level [XHTML 1.0 Transitional] What am I doing wrong? Thanks.
×
×
  • Create New...