php variable passed by jquery and get it for $ _GET to another php page

leesdepth

New Member
I usually go to the news of the story expanded, passes the variable with a while, as follows:\[code\]while ($noticias = @mysql_fetch_array($sql)) {$sqll = mysql_query("SELECT * FROM categorias WHERE id='".$noticias['categoria']."'");$datos = mysql_fetch_array($sqll);<div class="leermas"><a href="http://stackoverflow.com/questions/3743009/noticias.php?n='.$noticias['id'].'"><strong>(Leer m&aacute;s)</strong></a></div></div></div>';}\[/code\]but now I want is to load the content of the page in a div and I usually when I don't have to pass php variable in this way:the link for load content\[code\]<a class="recursostopwebjqampliada" href="">\[/code\]jQuery code that I have it in an external file called load.js\[code\]$(document).ready(function() { $(".recursostopwebjqampliada").live("click", function(){ $("div#main2").load("topwebjq_ampliada.php?n='.$noticias['id'].'");//AQUI DONDE ESTA LA VARIABLE }); });\[/code\]and the page that loads the div I get the variable as follows:\[code\]$id = $_GET['n']; \[/code\]the problem is that jQuery does not read the file php load.jsthen how I can fix it\[code\]load("topwebjq_ampliada.php?n='.$noticias['id'].'"\[/code\]
 
Back
Top