No hallo la forma de meter el contador, ni en dónde, mi código php es:
Código:
<?php require_once('Connections/Carrito1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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;
}
}
$colname_detalle = "-1";
if (isset($_GET['foto_id'])) {
$colname_detalle = $_GET['foto_id'];
}
mysql_select_db($database_Carrito1, $Carrito1);
$query_detalle = sprintf("SELECT * FROM fotos_mias WHERE foto_id = %s", GetSQLValueString($colname_detalle, "int"));
$detalle = mysql_query($query_detalle, $Carrito1) or die(mysql_error());
$row_detalle = mysql_fetch_assoc($detalle);
$totalRows_detalle = mysql_num_rows($detalle);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/carrito.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Página de Detalles</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="estilos/fotos.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0">
<tr>
<td>Aqui va el Logo </td>
</tr>
<tr>
<td align="center"><table width="85%" border="0">
<tr align="center">
<td><a href="index.php">INICIO</a></td>
<td>ENLACE 2</td>
<td>ENLACE 3 </td>
<td>ENLACE 4</td>
</tr>
</table></td>
</tr>
<tr>
<td><!-- InstanceBeginEditable name="Edicion" -->
<div id="detalle" align="center">
<table width="100%" border="0">
<tr>
<td align="center"><h2><?php echo $row_detalle['lugar']; ?></h2></td>
</tr>
<tr>
<td align="center"><?php echo $row_detalle['descripcion']; ?></td>
</tr>
<tr>
<td align="center">Esta foto ha sido vista <?php echo $row_detalle['hits']; ?> veces</td>
</tr>
<tr>
<td align="center" class="detalle1"><img src="fotos/<?php echo $row_detalle['nombre']; ?>" width="400" height="598"></td>
</tr>
</table>
</div>
<!-- InstanceEndEditable --></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($detalle);
?>
Como ves estoy usando una plantilla y estoy trabajando en Dreamweaver. Gracias de nuevo.