using jquery .ajax or .get to receive content from database via php script -


i have php script communicate mysql right now, , displays in tab number 2:

$res = mysql_query("select k_id, title headings    match (title) against('$kquery') order    match (title) against('$kquery') desc");   while ($result = mysql_fetch_array($res)){         $kid= $result['k_id'];         echo "<h1>{$result['title']}</h1>";         $content = mysql_query("select content, url, id kparagraphs k_id = '$kid' limit 3");         while ($con = mysql_fetch_array($content)){             echo $con['content'];         }         } 

what i'm doing selecting/loading content database in tab number one. wanted content displayed in tab number 2 being loaded via ajax. how in jquery php?

how pass data file ...the php script starts $kid = $_get['title']....title enocoded in url. how can pass along using mentioned answer uses .load?

1.) create page want loaded via ajax using code above , echo out result.

2.) create 2 div's content can later turn tabs if want, assign id values mydiv1 , mydiv2

3.) @ top of page div1 , div2 make sure have jquery script loaded , add code like:

<script type="text/javascript">   $('div#mydiv2').load('url_to_the_file_you_created_with_div_2_content'); </script> 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -