Load MySQL Data using JQuery

Of course, you won't be redirected to another page to see the result. That's the best thing about JQuery, although AJAX can also do it.

Anyway, here's the code snippet for the user's side..

<input id="datepicker" maxlength="20" type="text" />
<div id="refresh_img">Select Date to Load images..</div>

<script type="text/javascript">
    var variable= document.getElementById('datepicker').value;
    $('#refresh_img').load('query/getprojimg.php',{"variable": variable}).fadeIn("slow");

And for the server side.

   $query="SELECT * FROM projimg,proj where proj.projid=projimg.projid and uploaddate='$fix' order by imgid DESC;" ;

Something like that...

Popular posts from this blog

Hot/Cute flat-chested Girls

Set table width to 100% on PDF export in Datatables