Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with php


luigicosta

Recommended Posts

Hello to all, another little problem, I can not venirmene and out of this problem:

 

if the product is available is written out Verde (green)

if the product is not available should be written out Rosso (Red) and not both red and Green

 

 

ideas??

 

 

thnaks

 

 

	 <td><?php echo IN_STOK ?></td>
	 <td align="center">
 <?php
  if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
  echo TEXT_ROSSO
 ?>

 <?php
  }
  echo TEXT_VERDE
 ?>		 
	 </td>

Link to comment
Share on other sites

What don't work exactly?

 

Parse error: syntax error, unexpected '}', expecting ',' or ';' in /web/htdocs/www.firstcellular.co.uk/home/product_info.php on line 205

 

 

 

   <tr>
	 <td><?php echo IN_STOK ?></td>
	 <td align="center">

<?php
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
   echo TEXT_ROSSO
 } else {
   echo TEXT_VERDE
}
?>   

	 </td>
	 <td> </td>		 
    </tr>

Link to comment
Share on other sites

How about adding a ; after each echo?

 

<?php
if ( $product_info['products_date_available'] > date('Y-m-d H:i:s') ) {
  echo TEXT_ROSSO ;
} else {
  echo TEXT_VERDE ;
}
?>

 

 

 

great great thanks a lot......

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...