I would really appreciate it if someone could help me out here ... im kinda stuck
functions.php
--------------
class stats{
public function Updates()
{
$query = mysql_query("SELECT blah blah ") or die(mysql_error());
while($row=mysql_fetch_array($query))
$data[]=$row;
if(!empty($data))
{
return $data;
}
}
--------------
div_load.php
--------------
include_once('functions.php');
$son = new stats();
$updatesarray=$son->Updates();
if($updatesarray)
{
foreach($updatesarray as $data)
{
$name=data['name'];
<div >blah blah</div>
}
}
-----------
index.php
-----------
im trying to get new content using jquery load function.... rather than a page refresh every time ... it works with page refresh .. but i cannot get it to work with jquery load function .... could use the help .. thank you
I'm not sure why you are instantiating a function here, but you should just call the function, you should only instantiate classes...
$son = new updates();
$updatesarray=$son->Updates();
You should be able to just call $son = Updates();
also, is the Updates function wrapped in a class called updates? If not that code would error out... and you are not showing us the jquery or html code either, which is needed to answer the question.
index.php just contains include(div-load.php)
As for jquery part im doing $(selector).live(click, function(){ this.load()});