Click here to Skip to main content
15,915,083 members
Home / Discussions / Web Development
   

Web Development

 
QuestionGet complete URL address on address bar of browser Pin
tannghia22-May-10 5:20
tannghia22-May-10 5:20 
QuestionSocial Networking website Pin
mwaqas199021-May-10 19:20
mwaqas199021-May-10 19:20 
AnswerRe: Social Networking website Pin
Andy_L_J21-May-10 20:04
Andy_L_J21-May-10 20:04 
AnswerRe: Social Networking website Pin
Roger Wright21-May-10 20:27
professionalRoger Wright21-May-10 20:27 
GeneralRe: Social Networking website Pin
mwaqas199021-May-10 21:32
mwaqas199021-May-10 21:32 
QuestionOkay, This should be simple for you guys. Pin
Stathread20-May-10 7:53
Stathread20-May-10 7:53 
AnswerRe: Okay, This should be simple for you guys. Pin
T M Gray20-May-10 8:34
T M Gray20-May-10 8:34 
AnswerRe: Okay, This should be simple for you guys. Pin
Dr.Walt Fair, PE20-May-10 9:17
professionalDr.Walt Fair, PE20-May-10 9:17 
If you don't want the whole page to refresh when you update, then you probably need to use AJAX with a timer event to call the PHP code that returns the updated record count. On the PHP side it could be as simple as doing a select query and returning a count. On the Javascript side you'll need to provide a call to your PHP using AJAX and if all you want back is a record count, you can get that with the text property rather than doing a whole XML transfer. Without writing the whole thing, your PHP could be as simple as:
// Set up MySql connection
 $sql= "SELECT COUNT(*) FROM mytable WHERE Whatever = 'What Im looking for'";
 $result = mysql_query($sql) or die("Sorry, you screwed up!");
 echo mysql_num_rows($result);


Here's an example of doing the stuff based on a timer event in Javascript[^]. You'd put your function to do the update call as the argument to the timer.

To handle the AJAX, take a look at this PHP AJAX tutorial[^]. You put your own Javascript code to handle the return and update your label as required.
CQ de W5ALT

Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software


QuestionIs there a tool for simple multi user access test? Pin
AglaiaMasaki18-May-10 22:52
AglaiaMasaki18-May-10 22:52 
AnswerRe: I found the tool, Jmeter. Pin
AglaiaMasaki19-May-10 0:03
AglaiaMasaki19-May-10 0:03 
QuestionAd Rotators on Orange Webmail page, knew what other sites I'd visited. Pin
mnemonic6918-May-10 20:41
mnemonic6918-May-10 20:41 
AnswerRe: Ad Rotators on Orange Webmail page, knew what other sites I'd visited. Pin
David Skelly18-May-10 22:35
David Skelly18-May-10 22:35 
GeneralRe: Ad Rotators on Orange Webmail page, knew what other sites I'd visited. Pin
mnemonic6919-May-10 11:45
mnemonic6919-May-10 11:45 
QuestiononClick is not working with input type = image. [modified] Pin
codesean18-May-10 10:17
codesean18-May-10 10:17 
AnswerRe: onClick is not working with input type = image. Pin
Not Active18-May-10 11:27
mentorNot Active18-May-10 11:27 
Questionwebsite got hacked Pin
Rohit16db18-May-10 2:09
Rohit16db18-May-10 2:09 
AnswerRe: website got hacked Pin
R. Giskard Reventlov18-May-10 2:31
R. Giskard Reventlov18-May-10 2:31 
GeneralRe: website got hacked Pin
Johnny J.20-May-10 2:03
professionalJohnny J.20-May-10 2:03 
QuestionWeb Development Software? Pin
soterios17-May-10 3:30
soterios17-May-10 3:30 
AnswerRe: Web Development Software? Pin
David Mujica17-May-10 6:21
David Mujica17-May-10 6:21 
AnswerRe: Web Development Software? Pin
Not Active17-May-10 7:19
mentorNot Active17-May-10 7:19 
QuestionMCTS Certification Pin
yadlaprasad16-May-10 20:06
yadlaprasad16-May-10 20:06 
AnswerRe: MCTS Certification Pin
The Man from U.N.C.L.E.17-May-10 7:34
The Man from U.N.C.L.E.17-May-10 7:34 
Question">" problems in PHP statement Pin
SNArruda15-May-10 6:06
SNArruda15-May-10 6:06 
Questionwebsite ads Pin
mnemonic6913-May-10 10:17
mnemonic6913-May-10 10:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.