Jump to content

Recommended Posts

I have this code which displays a cart on the righthand side of the page. Basically I want to take the cart and display a copy of it below the original. I will eventually be editing this cart to show different information but I seem to be having problems with just copying the php code and pating an exact copy. I get the error:

 

Parse error: syntax error, unexpected $end in /home/bromi/public_html/ifooter.html on line 182

 

However line 182 is blank and is the last line of the code. Thanks for any help.

 

<!--Cart Column-->
    <td valign=top>

	<?
    /////////////////////////////////////////////////////////////////////
    // MINICART
    /////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////
    //right side nav, cart, etc
    ////////////////////////////////////////////////////
    if ( !strstr($page, "signup")) {
    	
    	if ($page!="fullcart") {
    	////////////
    	//Mini Cart
    	
      echo "<table id='Table_01' width='159' border='0' cellpadding='0' cellspacing='0'>";
      echo "	<tr>";
      echo "		<td colspan='4' background='images/cart_01.gif' width='159' height='27' >";
      echo "		&nbsp&nbsp<b>Mini Cart</b>";
      echo "		</td>";
      echo "	</tr>";

    
    	$carts = $_SESSION ["carts"];
    	if ($carts) {
    		foreach ($carts as $cart) {
    		
          echo "<tr><td colspan='3' background='images/cart_02.gif' width='119' height='100%' align=left>";
          echo "&nbsp&nbsp " . substr($cart[1], 0, 12) . "..";
          echo "</td><td background='images/cart_03.gif' width='40' height='100%' align=right>";
          echo "$cart[2]&nbsp&nbsp&nbsp&nbsp";
          echo"</td></tr>";
              		
  		
     		}
    	}
    
    
      echo "<tr><td><img src='images/cart_04.gif' width='54' height='84' alt=''></td>";
      echo "<td><a href=index.php?page=fullcart><img border=0 src='images/cart_05.gif' width='48' height='84' alt='Detailed Cart'></a></td>";
      echo "<td colspan='2'><a href='/access/login.php' target=_blank>";
      echo "<img src='images/cart_06.gif' border=0 width='57' height='84' alt='Print Cart'></a></td>";
      echo "</tr><tr><td>";
      echo "<img src='spacer.gif' width='54' height='1' alt=''></td>";
      echo "<td><img src='images/spacer.gif' width='48' height='1' alt=''></td>";
      echo "<td><img src='images/spacer.gif' width='17' height='1' alt=''></td>";
      echo "<td><img src='images/spacer.gif' width='40' height='1' alt=''></td>";
      echo "</tr></table>";
          
          	
      echo "<Br>";
    	}
        
        
        
    	
    	////////////
    	//advertisment
    	
      echo "<table id='Table_01' width='159'  border='0' cellpadding='0' cellspacing='0'>";
      echo "<tr><td><img src='images/blank_01.gif' width='159' height='15' alt=''></td>";
      echo "</tr><tr><td background='images/blank_02.gif' width='159' height='100%' valign=top align=center>";
      
      echo "<h3>Advertise with Us&nbsp</h3>";
      echo "Find out how! <Br> <a href=index.php?page=signup1>Sign Up</a> ";
      
      echo "</td></tr><tr><td><img src='images/blank_03.gif' width='159' height='25' alt=''></td>";
      echo "</tr></table>";

      echo "<table id='Table_01' width='159'  border='0' cellpadding='0' cellspacing='0'><tr><Td valign=top align=center>";
      include ("side-banner.html");
      echo "</table>";

    }
        
        
    
    ?>






</tr>

</table><!--End of middle 3 col table--></td>
</tr>

<tr>
	<td colspan='2'>
		<img src='images/adsaver_10.gif' width='337' height='43' alt=''></td>
	<td width=100%>
		<img src='images/adsaver_11.gif' width='100%' height='43' alt=''></td>
	<td colspan='5'>
		<img src='images/adsaver_12.gif' width='337' height='43' alt=''></td>
	<td>
		<img src='images/adsaver_13.gif' width='2' height='43' alt=''></td>
</tr>
<tr>
	<td>
		<img src='images/spacer.gif' width='31' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='306' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='124' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='82' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='80' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='81' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='81' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='13' height='1' alt=''></td>
	<td>
		<img src='images/spacer.gif' width='2' height='1' alt=''></td>
</tr>

<Tr><TD colspan=9>

<? 
/////////////////////////////////
// Bottom banner space
//////////////////////////////////
echo "<center>";
include ("bottom-banner.html");
echo "</center>";
?>

</table>

Link to comment
https://forums.phpfreaks.com/topic/79130-solved-help-with-repeating-box/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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