Ver Mensaje Individual
  #36 (permalink)  
Antiguo 04/04/2008, 14:49
zubintro
 
Fecha de Ingreso: septiembre-2007
Mensajes: 120
Antigüedad: 16 años, 7 meses
Puntos: 0
Re: Variable dentro del query

amigo de verdad agradezco la ayuda que me estas brindando pero te comento que continua dando el error y sumado a eso no hace la busqueda.... lo coloque asi
Código PHP:
$conexion=mysql_connect("localhost","root","");
mysql_select_db("inscripciones",$conexion);

$buscar=$_POST['buscar'];

if (!@
mysql_select_db('inscripciones')) {
exit(
'<p>Unable to locate the joke ' .
'database at this time.</p>');
}
echo 
$tabla;

if (
mysql_select_db('inscripciones'))
{
$sql="select * from '$tabla' where id='$buscar'";
}

if(list (
$id,$nombre,$apellido,$cedula,$sexo,$email,$codigo,$telefono,$fecha,$opcional,$egreso,$carrera,$pactual,$banco,$deposito) = mysql_fetch_array($consulta)){
?>