chen2424 Posted November 3, 2009 Share Posted November 3, 2009 Hi Guys, this code seems to work in my osc header.php but it causes a slight conflict with another register function. Ive streamlined problem to be in this peice code, probably the if else part, can someone help out here pls, my php is far fm brilliant , but im trying man.... thanks in advance! <table> <?php if (tep_session_is_registered('customer_id')) {?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . 'buttonlogout.jpg', HEADER_TITLE_LOGOFF); ?></a> <a href="account_history.php"><img border="0" src="images/orderhistory.png"></a> <tr><td><?php }else{ echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));?></td></tr> <tr><td>Email :<?php echo tep_draw_input_field('email_address');?></td></tr> <tr><td>Password:<?php echo tep_draw_password_field('password');?></td></tr> <tr><td><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); } ?></td></tr> </table> kind regards, Chen Link to comment https://forums.phpfreaks.com/topic/180104-php-if-else-statement-and-less-than-brilliant-formatting/ Share on other sites More sharing options...
joel24 Posted November 3, 2009 Share Posted November 3, 2009 whats the error / conflict? Link to comment https://forums.phpfreaks.com/topic/180104-php-if-else-statement-and-less-than-brilliant-formatting/#findComment-950119 Share on other sites More sharing options...
chen2424 Posted November 3, 2009 Author Share Posted November 3, 2009 the error is that on create_account.php the continue button doesnt work. Basically the code ive posted above causes that conflict so i was asking if there was errors in that code i posted, Link to comment https://forums.phpfreaks.com/topic/180104-php-if-else-statement-and-less-than-brilliant-formatting/#findComment-950121 Share on other sites More sharing options...
joel24 Posted November 3, 2009 Share Posted November 3, 2009 ... not that i can see? only problems i can see are HTML errors with your <tr> and <td> tags? if the 'else' block executed, the first table row wouldn't have an opening <tr><td>, just a closing <tr><td> try <table> <?php if (tep_session_is_registered('customer_id')) {?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . 'buttonlogout.jpg', HEADER_TITLE_LOGOFF); ?></a> <a href="account_history.php"><img border="0" src="images/orderhistory.png"></a> <?php }else{ ?> <tr><td><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));?></td></tr> <tr><td>Email :<?php echo tep_draw_input_field('email_address');?></td></tr> <tr><td>Password:<?php echo tep_draw_password_field('password');?></td></tr> <tr><td><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?> </td></tr> <?php } ?> </table> Link to comment https://forums.phpfreaks.com/topic/180104-php-if-else-statement-and-less-than-brilliant-formatting/#findComment-950131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.