Hola! estoy teniendo un problema y necesito resolverlo urgente!!
tengo este codigo
Código PHP:
Ver original<?php
//conexion
if (!$conexion) die ("Error al conectarse con la base de datos");
if(!$res)die( "Error al seleccionar el base de datos");
$empleado_busqueda=$_POST['empleado'];
if($_SERVER['REQUEST_METHOD']=='POST'){
//hago la consulta filtrada por auto
$sql ="SELECT id,imagen,remarquable,marque,modele,version,anne,kilometrage,prix,etat FROM cars WHERE marque like '%$empleado_busqueda%'";
$hay_imagen = $ver['imagen'];
$esprimerafila=true;
//muestro los resultados
echo "<table style='padding:1px;font-family:Calibri;width:100%;' cellpadding='4' cellspacing='4' class='table'>";
if ($esprimerafila){
echo "<tr>";
foreach($fila as $campo=>$valor){
echo "<td bgcolor='#c5e2f5'><b>", strtoupper( $campo), "</b></td>"; }
$esprimerafila=false;
echo "</tr>";
}
echo "<tr class='td-hover'>";
foreach($fila as $campo=>$valor){
echo "<td>";
if($campo=='imagen'){
echo "<img width='150' src='uploads/",$valor,"'/>";
}else{
if($valor=='Si'){
echo "<img width='20' src='images/destacado.gif'/>";
}else{
echo $valor;}
echo "</td>";
}
//editar
echo "<td width='100' style='background-color:#efefef;padding:4px;'>";
echo '<a style ="text-decoration:none;color:#555;" title="Éditer" href="modificar_auto.php?codauto=',$fila['id'],'">';
echo '<img src="images/edit.png" border="0" width="15"/>Éditer';
echo "</a>";
echo "</td>";
//borrar
echo "<td width='100' style='background-color:#efefef;padding:4px;'>";
echo "<a style ='text-decoration:none;color:#555;' title='Supprimer' href='borrar_auto.php?codauto=",$fila['id'],"' onClick='return confirm(\"Desea borrar el auto?\");'>";
echo '<img src="images/borrar.png" border="0" width="15"/>Supprimer';
echo "</a>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<div class='total-registros'> </br> Total des fichiers $total</div>";
}else{
//hago la consulta empleados
$sql ="SELECT id,imagen,remarquable,marque,modele,version,anne,kilometrage,prix,etat FROM cars";
$esprimerafila=true;
//muestro los resultados
echo "<table style='padding:1px;font-family:Calibri;width:100%;' cellpadding='4' cellspacing='4' class='table'>";
if ($esprimerafila){
echo "<tr>";
foreach($fila as $campo=>$valor){
echo "<td bgcolor='#c5e2f5'><b>", strtoupper( $campo), "</b></td>"; }
$esprimerafila=false;
echo "</tr>";
}
echo "<tr class='td-hover'>";
foreach($fila as $campo=>$valor){
echo "<td>";
if($campo=='imagen'){
echo "<img width='150' src='uploads/",$valor,"'/>";
}else{
if($valor=='Si'){
echo "<img width='20' src='images/destacado.gif'/>";
}else{
echo $valor;}
echo "</td>";
}
//editar
echo "<td width='100' style='background-color:#efefef;padding:4px;'>";
echo '<a style ="text-decoration:none;color:#555;" title="Éditer" href="modificar_auto.php?codauto=',$fila['id'],'">';
echo '<img src="images/edit.png" border="0" width="15"/>Éditer';
echo "</a>";
echo "</td>";
//borrar
echo "<td width='100' style='background-color:#efefef;padding:4px;'>";
echo "<a style ='text-decoration:none;color:#555;' title='Supprimer' href='borrar_auto.php?codauto=",$fila['id'],"' onClick='return confirm(\"Desea borrar el auto?\");'>";
echo '<img src="images/borrar.png" border="0" width="15"/>Supprimer';
echo "</a>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<div class='total-registros'> </br> Total des fichiers $total</div>";
}}
?>
y me sale este error
Parse error: syntax error, unexpected T_ELSE in /usr/www/virtual/tiffany/www.autosglobale.com/admin/inc/empleados.php on line 81
tienen idea porque es? quizas tengo algo mal cerrado poer la verdad es q no me doy cuentaa!!