473,395 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Page Need to be Auto Refresh after every bid

2
Hi Guys,

I am new to this forum and find very interesting.

I need your help in one of the script.

I got a MySQL table bid_amount, and i want that if some new data comes in this table and where the table data is shown on webpage, that webpage need to be auto refresh.

To make it more easy to understand

See someone bids a amount on specific item and that bid amount goes in mysql and the outcome of that current update will auto refresh the webpage frontend data.

I hope you will understand what i want to do. I need a command for auto-refresh of webpage when some new data comes in MySQL table.

Please help me out and i will appreciate it.,


Thx in advance
Lezzo
Nov 28 '07 #1
3 3564
pbmods
5,821 Expert 4TB
Heya, Lezzo. Welcome to TSDN!

There is no way to do this directly; HTTP is a 'stateless' protocol, which means that the server completely forgets about the client as soon as it sends the page.

You could use AJAX and send a request out once every x seconds to see if the high bid has changed and then refresh the page if it has (or better yet, just update the current bid amount using JavaScript).
Nov 28 '07 #2
lezzo
2
Hi,

Thanks for your response, can you please provide me the ajax or javascript code which search the updated data from mysql and refresh the frontend webpage at same time.

Lezzo
Nov 28 '07 #3
pbmods
5,821 Expert 4TB
Heya, Lezzo.

You'd want to create a PHP script that fetches the highest bid for an auction and echoes it.

On the JavaScript side, send an AJAX call to that script and compare the result with the current value. If the value has changed, then you can either refresh the page or just simply update the displayed current bid.

Use setInterval() or setTimeout() to repeat the AJAX call.
Nov 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like...
37
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
3
by: francois | last post by:
I have an aspx page that needs to reload itself every x seconds. X is a parameter retrieve from the DB or the web.config file, just to point out that it will not be hardcoded. I need to refresh...
2
by: MattB | last post by:
I have a page I've migrated from HTML to asp.net that would auto-refresh every 30 seconds. I did this by putting the following in the <head> section: <meta name="refresh" content="30"> But now...
4
by: Coleen | last post by:
Hi All :-) I have a web page that I need to refresh every time the page loads. I thought that the page automatically did a refresh/postback on the Page_Load event. Isn't refreshing the page the...
7
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would...
4
by: Phil | last post by:
Hi. A fairly basic sort of 'direction to go in' question of the type that can be hard to find an answer to! I am using ASP.NET (framework 1.1) to present data on web pages (IIS 5.0 / IE6) from...
10
by: phforum | last post by:
Hi, I wrote a PHP page for user input the information to search the database. And the database data will update every second. I want to set the auto refresh to get the data from database every...
3
by: tinuananster | last post by:
Hi, I need to auto refresh a page after a specific time interval. When the page is accessed the first time, a request parameter is null and hence it gets redirected to a welcome page (static...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.