Jump to content

Recommended Posts

Hi everyone....can't seem to figure this one out. I don't see what is wrong with line 220....I've tried removing the spaces thereby running everything together, tried removing some of the spaces (i.e. the space between "2011" and <?php) among various other combinations of spacing, still get these errors.....don't see any unclosed/unresolved ending tags.....

 

220 attributes construct error [XHTML 1.0 Strict]

220 Couldn't find end of Start Tag option line 220 [XHTML 1.0 Strict]

220 Opening and Ending tag mismatch: select line 218 and option [XHTML 1.0 Strict]

222 Opening and Ending tag mismatch: div line 216 and select [XHTML 1.0 Strict]

 

 

Here is the code:

 

216 <div class="content_onecolumn">

217 <label for="report_year" class="long"><span style="font-weight:bold">1.</span> Report for Year:</label>

218 <select name="report_year" id="report_year" class="selectTwo">

219 <option value="" selected="selected">*Select the Year*</option>

220 <option value="2011" <?php if($_POST['report_year'] == 2011) echo 'selected';?>>2011</option>

221 </select>

222 </div>

 

 

Any ideas? Thanks - Steve

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/274235-attributes-construct-error/
Share on other sites

Hi all - thanks for the replies. Still haven't gotten it to work, I get the same errors. I've tried various combinations including the following:

 

Tried this first....

<option value="2011" <?php if($_POST['report_year'] == 2011) { echo 'selected="selected"'; } ?>>2011</option>

 

Then this....

<option value="2011" <?php if($_POST['report_year'] == 2011) { echo "selected='selected'"; } ?>>2011</option>

 

Then this....

<option value="2011" <?php if($_POST['report_year'] == 2011) echo 'selected="selected"'; ?>>2011</option>

 

Lastly this....

<option value="2011" <?php if($_POST['report_year'] == 2011) echo "selected='selected'"; ?>>2011</option>

 

 

Not sure where to go from here!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.