jim.davidson Posted May 11, 2007 Share Posted May 11, 2007 I can't see the error... I'm using PHP mySQL 4.1.21 and dreamweaver8 Parse error: parse error, unexpected T_ELSE in C:\Sites\recycle_customer_update.php on line 381 Here's the section of code <select name="abbreviation" id="abbreviation" class="text_background"> <?php if ($error()) { ?> <option value=" <?php $state?>"<?php {echo "selected=\"selected\"";} ?>>Select a State</option> <?php else { ?> ****this is line 381 *** <option value=" <?php if (!(strcmp("", $row_getCustomer['state'])))?>"<?php echo "selected=\"selected\"";} ?>>Select a State</option><?php } ?> <?php do { ?> <option value="<?php echo $row_GetStates['abbreviation']?>"<?php if (!(strcmp($row_GetStates['abbreviation'], $row_getCustomer['state']))) {echo "selected=\"selected\"";} ?>><?php echo $row_GetStates['state_name']?></option> <?php } while ($row_GetStates = mysql_fetch_assoc($GetStates)); $rows = mysql_num_rows($GetStates); if($rows > 0) { mysql_data_seek($GetStates, 0); $row_GetStates = mysql_fetch_assoc($GetStates); } ?> </select> Quote Link to comment https://forums.phpfreaks.com/topic/50975-help-cant-find-the-error/ Share on other sites More sharing options...
per1os Posted May 11, 2007 Share Posted May 11, 2007 confusing [ code ] tags work. <?php }else { ?> ****this is line 381 *** <option value=" <?php if (!(strcmp("", $row_getCustomer['state'])))?>"<?php echo "selected=\"selected\"";} ?>>Select a State</option><?php } ?> You have to close off the first if with a closing bracket } Quote Link to comment https://forums.phpfreaks.com/topic/50975-help-cant-find-the-error/#findComment-250791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.