Como dice IEKK eso que quieres hacer es ajax.
Lo que hice fue crear diferentes paginas y despues llamarlas con ajax
Para algo similar yo utilice javascript este es el codigo que te seria util
Código:
function ahah(url,id) {
// native XMLHttpRequest object
//document.getElementById(id).innerHTML = 'Cargando... por favor espere un momento';
if (window.XMLHttpRequest) {
var myurl = url;
myRand = parseInt(Math.random()*999999999999999);
var modurl = myurl+"?rand="+myRand;
req = new XMLHttpRequest();
req.onreadystatechange = function() {ahahListo(id);};
req.open("GET", modurl, true);
req.send();
// IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = function() {ahahListo(id);};
req.open("GET", url, true);
req.send();
}
}
}
function ahahListo(id) {
// only if req is "loaded"
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
results = req.responseText;
document.getElementById(id).innerHTML = results;
} else {
document.getElementById(id).innerHTML="jah error:\n" +
req.statusText;
}
}
}
y para llamar la funcion javascript solo en el evento onclick lo llamas asi:
Código PHP:
<a target="_top" href="javascript:void(0)" onclick="ahah('pagina_a_mostar.php','id_donde_cargaras_la_pagina');">Texto con el link</a>
para que entiendas todo esto mucho mejor te recomiendo investigar un poco de ajax yo investige sobre ahah(Asychronous HTML and HTTP) porque yo se muy poco sobre este tema pero este codigo me ha servido para mi web.
Espero te sirva mi aporte.