Ciao a tutti,

con lightbox ho creato una galleria di immagini e fin qui tutto bene.

Adesso però ho necessità di inserire durante lo slideshow un sistema di voto con le stellette e qui mi cominciano i problemi con qualche apice (credo) che mi crea problemi nel php.

Vi posto il codice:

Codice PHP:
<td width="100" height="100" valign="middle" bgcolor="#CCCCCC"><a href="../immagini/<?php echo $row_rs_galleria['immagine']; ?>" rel="lightbox[roadtrip]" title="
         <?php         $var $row_rs_galleria['descrizione'];
                     echo 
$var "

"

                     
/**********************************************************************************************************
                    ************** inizio a filtrare i corsi in base al fatto che siano conclusi ******************************
                    ****************************** e in base all'id ***********************************************************
                    **********************************************************************************************************/
                    
$utente $row_rs_galleria['id_contatti'];
                    
/**********************************************************************************************************
                    *************************** inserisco il recordset ********************************************************
                    **********************************************************************************************************/
                    
if (!function_exists("GetSQLValueString")) {
                    function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
                    {
                      if (
PHP_VERSION 6) {
                    
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
                      }
                     
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

                      switch (
$theType) {
                    case 
"text":
                      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
                     break;    
                    case 
"long":
                    case 
"int":
                      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
                      break;
                    case 
"double":
                      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
                     break;
                       case 
"date":
                      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
                      break;
                    case 
"defined":
                      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
                      break;
                          }
                      return 
$theValue;
                    }
                    }

                    
mysql_select_db($database_onapgest_connect$onapgest_connect);
                    
$query_rs_corsi_conclusi "SELECT corso FROM contatti_corsi WHERE stato_svolgimento = 'concluso'";
                    
$rs_corsi_conclusi mysql_query($query_rs_corsi_conclusi$onapgest_connect) or die(mysql_error());
                    
$row_rs_corsi_conclusi mysql_fetch_assoc($rs_corsi_conclusi);
                    
$totalRows_rs_corsi_conclusi mysql_num_rows($rs_corsi_conclusi);mysql_select_db($database_onapgest_connect$onapgest_connect);
                    
$query_rs_corsi_conclusi "SELECT corso FROM contatti_corsi WHERE id_contatti = $utente AND stato_svolgimento = 'concluso'";
                    
$rs_corsi_conclusi mysql_query($query_rs_corsi_conclusi$onapgest_connect) or die(mysql_error());
                    
$row_rs_corsi_conclusi mysql_fetch_assoc($rs_corsi_conclusi);
                    
$totalRows_rs_corsi_conclusi mysql_num_rows($rs_corsi_conclusi);
                    
/*********************************************************************
                    *********** stampo tutti i record ************************************
                    *********************************************************************/
                    
echo "L'utente ha seguito i seguenti corsi:
"
;
                    do {
                        echo 
htmlentities($row_rs_corsi_conclusi['corso'])."
"
;
                        } while (
$row_rs_corsi_conclusi mysql_fetch_assoc($rs_corsi_conclusi));
                    
//****** Link alla pagina delel votazioni ***************************
                    
if($row_rs_galleria[voto] == 0) {
                        echo 
"
Vota questa immagine.                         
                         <ul class=\"star-rating\"> 
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a> 
                        [/list]"
; } elseif($row_rs_galleria[voto] <= 10) {echo "
Vota questa immagine!                         
                         <ul class=\"star-rating\">
                             <li class=\"current-rating\" style=\"width:15%;\"> 
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a>
                        [/list]"
;
                        } elseif(
$row_rs_galleria[voto] >= 11 AND $row_rs_galleria[voto] <= 20) {
                            echo 
"
Vota questa immagine!                         
                         <ul class=\"star-rating\">
                             <li class=\"current-rating\" style=\"width:40%;\"> 
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a>
                        [/list]"
;
                        } elseif(
$row_rs_galleria[voto] >= 21 AND $row_rs_galleria[voto] <= 30) {
                            echo 
"
Vota questa immagine!                         
                         <ul class=\"star-rating\"> 
                             <li class=\"current-rating\" style=\"width:60%;\">
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a> 
                        [/list]"
;
                        } elseif(
$row_rs_galleria[voto] >= 31 AND $row_rs_galleria[voto] <= 39) {
                            echo 
"
Vota questa immagine!                         
                         <ul class=\"star-rating\">
                             <li class=\"current-rating\" style=\"width:80%;\"> 
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]." title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a>
                        [/list]"
;
                        } elseif(
$row_rs_galleria[voto] >= 40) {
                            echo 
"
Vota questa immagine!                         
                         <ul class=\"star-rating\"> 
                             <li class=\"current-rating\" style=\"width:100%;\">
                            [*]<a href=\"vota_lavoro.php?voto=1&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"1\" class=\"one-star\">1</a> 
                            [*]<a href=\"vota_lavoro.php?voto=2&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"2\" class=\"two-stars\">2</a> 
                            [*]<a href=\"vota_lavoro.php?voto=3&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"3\" class=\"three-stars\">3</a> 
                            [*]<a href=\"vota_lavoro.php?voto=4&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"4\" class=\"four-stars\">4</a> 
                            [*]<a href=\"vota_lavoro.php?voto=5&id_lavoro="
.$row_rs_galleria[id_lavoro]."\" title=\"5\" class=\"five-stars\">5</a> 
                        [/list]"
;
                        } 
                    
?>
                  //qui pare ci sia l'errore  "> //
questo è lo screen del risultato che ottengo a video:

problema



potete aiutarmi a capire dove è l'errore? in questo codice ho provato a mettere \ prima degli apici ma evidentemente mi sfugge qualcosa.

potete aiutarmi?