Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/08/2007, 08:15
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 8 meses
Puntos: 2135
Re: href enviar variable

Eso que quieres hacer no se puede hacer con PHP, tienes que hacerlo en javascript y seria algo asi:
Código:
function navegaAPagina( url ) {
      window.location = url;
}

function preguntaNombre() {
var nombre = prompt("Introduzca su nombre");
var url = "pagina_destino.html?nombre=" + nombre;
// Pedimos confirmación
if(isNaN(nombre)==true || nombre=="")
{
      alert("Debe escribir un nombre");
      return false;
}
else{
      navegaAPagina( url );
}
}
y en tu html:
Código HTML:
<a href="javascript: return preguntaNombre();">Click me!</a> 
PD te transfiero al foro de javascript ahi te podran ayudar mas.

Saludos.