bourgm Posted August 22, 2009 Share Posted August 22, 2009 Ok. So I'm not great at php. Got a simple code I need to change. The first part of the code lists status==0 and puts the url and text "Print" The 2nd part of the code else puts status ==0 and just says "already printed". What I need is the else section to do the same as the 1st part of the code but still say "Already Printed". Same url as the first. Everything I do comes back in error. I know this is easy for all of you, but i don't know much. lol ---code--- <?php $status=$row[print_status]; if($status==0){ ?> <a href="javascript:popWindows('print2.php?rid=<?=$row[id]?>&pid=<?=$_REQUEST['pid']?>','_winName','1000','1000','scrollbars=1')" style="color:#2A9F00; font-size:12px;"> <?=l1("Print")?></a> <?php } else { echo "<span style=color:#FF5F55; font-size:12px; font-weight:bold'>Already printed"; } ?> Link to comment https://forums.phpfreaks.com/topic/171379-solved-url-issue/ Share on other sites More sharing options...
AngelicS Posted August 22, 2009 Share Posted August 22, 2009 I don't know if this is exactly what you need, but I've fixed your code. Here you go: <?php $status=$row['print_status']; if($status==0) { ?> <a href="javascript:popWindows('print2.php?rid=<?php echo $row['id']; ?>&pid=<?php echo $_REQUEST['pid'];?>','_winName','1000','1000','scrollbars=1')" style="color:#2A9F00; font-size:12px;"> <?php echo "Print"; echo "</a>"; } else { ?> <a href="javascript:popWindows('print2.php?rid=<?php echo $row['id']; ?>&pid=<?php echo $_REQUEST['pid'];?>','_winName','1000','1000','scrollbars=1')" style="color:#2A9F00; font-size:12px;"> <?php echo "Already printed"; echo "</a>"; } ?> By the way, try using the code tags, and try posting the error(s) you get =) Best wishes //AngelicS Link to comment https://forums.phpfreaks.com/topic/171379-solved-url-issue/#findComment-904004 Share on other sites More sharing options...
bourgm Posted August 22, 2009 Author Share Posted August 22, 2009 Thanks.. You got it. Link to comment https://forums.phpfreaks.com/topic/171379-solved-url-issue/#findComment-904095 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.