Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/05/2008, 23:48
Avatar de Capimaster
Capimaster
 
Fecha de Ingreso: agosto-2004
Mensajes: 494
Antigüedad: 22 años, 2 meses
Puntos: 2
Re: Enlace que manda a una pagina nueva

Estoy un poco troco todavia con esto del php, de antemano quiero agradecerles la paciencia y ojala me puedan ayudar...

Bueno ahora les hablare con ejemplos y codigo

http://www.elcapitolio.net/index3.php

Si entas a esta url vas a ver un poco lo que estoy haciendo con mi script.... ahi les aparecera el encabezado de mi noticia con titulo y un boton que dice ver nota... al dar click ahi se van a dar cuenta que si me lo muestra pero me manda a una pagina en blanco nueva. no ventana solo pagina nueva... lo que quiero hacer es que el resultado me lo muestre dentro de ese mismo cuadro de diseño donde viene mi logotipo y mis banner y eso...

les dejo el codigo de mi archivo noti.php... para que le echen un vistazo

Código PHP:
<?php require_once('Connections/noticias.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;
}
}

$maxRows_ultimas = 10;
$pageNum_ultimas = 0;
if (isset(
$_GET['pageNum_ultimas'])) {
  
$pageNum_ultimas = $_GET['pageNum_ultimas'];
}
$startRow_ultimas = $pageNum_ultimas * $maxRows_ultimas;

mysql_select_db($database_noticias, $noticias);
$query_ultimas = "SELECT * FROM noticias";
$query_limit_ultimas = sprintf("%s LIMIT %d, %d", $query_ultimas, $startRow_ultimas, $maxRows_ultimas);
$ultimas = mysql_query($query_limit_ultimas, $noticias) or die(mysql_error());
$row_ultimas = mysql_fetch_assoc($ultimas);

if (isset(
$_GET['totalRows_ultimas'])) {
  
$totalRows_ultimas = $_GET['totalRows_ultimas'];
} else {
  
$all_ultimas = mysql_query($query_ultimas);
  
$totalRows_ultimas = mysql_num_rows($all_ultimas);
}
$totalPages_ultimas = ceil($totalRows_ultimas/$maxRows_ultimas)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.bordenegro {border:1px solid black;border-bottom:1px solid black}
.notihead {font-family: "Segoe UI", Arial; color: #000000;    font-size: 11px;}
.notititle {font-family: "Segoe UI", Arial; color: #000000;    font-size: 11px; text-align:center; font-weight:bold}
-->
</style>
</head>

<body>
<?php do { ?>
<table width="100%" align="center" cellpadding="0" cellspacing="2"  onmouseover="this.style.background = '#EEEEEE';"  onmouseout="this.style.background = '#FFFFFF';" style=" border-bottom:2px solid #cccccc ">
  <tr>
    <td width="65%"><div class="notititle"><?php echo $row_ultimas['titulo']; ?></div>
        <div align="center"></div></td>
  </tr>
  <tr>
    <td valign="top"><div class="notihead">
    
    <?php echo $row_ultimas['imagen']; ?><img src="<?php echo $row_ultimas['ruta']; ?>" width="130" height="120" hspace="5" vspace="5" align="left" />
     -->
    
    <?php echo $row_ultimas['resumen']; ?></div>
</td>
  </tr>
  <tr>
    <td valign="top">        <div align="right">
    
    
    <a href="http://www.elcapitolio.net/noticias/notas.php?pageNum_ultimas=2&amp;totalRows_ultimas=3" target="_parent"><strong><img src="/images/vernota2.gif" width="66" height="15" border="0" /></strong></a></div></td>
  </tr>
</table>
<?php } while ($row_ultimas = mysql_fetch_assoc($ultimas)); ?>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result
($ultimas);
?>
Muchas gracias por su ayuda
__________________
http://www.elcapitolio.com.mx - Ocotlán, Jalisco, México