Jump to content

Reloading PHP file


Ghezzo

Recommended Posts

Hello, I have tried to reload a PHP file using jquery for a while now, the PHP file contains a mysql_query that currently gets a number from the database.

 

$result = mysql_query("SELECT * FROM job");
while($row = mysql_fetch_array($result))
{
$test = $row['test'];
}
echo $test;

 

It shows the number the first time, but when I reload it using jquery it's shows up empty.

I have used jquery .load and I can see, when using fadeout and fadein, that the div is "reloaded", but the PHP file returns nothing and theres no error in firebug.

 

 

Also,

mysql_query("UPDATE job SET test = test + 1");

 

updates the number, and I want to get the updated number.

 

 

Sorry if its hard to understand me, but what I need to do is get the updated number when the mysql_query have been run.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.