473,324 Members | 2,166 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,324 software developers and data experts.

How to refresh page every time it is used

2
Hello,

Im using very basic script to show records form database(mysql)
and link that remove the record.

And the problem is when i click delete link IE show same page
with link 'delete' marked as visited, i can only click one more time
or hit F5 to get actual results.(without record that i clicked to remove)

How i can make this script to show actual content immediatly
after i click remove link?

Below is the script

index.php:
[PHP]
$id=$_GET[id];
while($row = mysql_fetch_array($result)){
echo $row[id]." ";
echo $row[name]." ".'<a href=index.php?delete=yes&id='.$row[id].'>delete</a><BR>';
}

if(!empty($_GET[delete]))
{$sql_delete="DELETE FROM `table1` WHERE `id` = '$id' LIMIT 1";
$w=mysql_query($sql_delete);

}[/PHP]
Sep 12 '07 #1
2 1775
kovik
1,044 Expert 1GB
The problem is that you get the data from the database before processing the deletion.
Sep 13 '07 #2
szy1
2
Thank you very much :)
Sep 15 '07 #3

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

Similar topics

2
by: thenetflyer | last post by:
<!-- The following sample should authorize the user to log on the site. This works once but after refreshing the browser, it does not prompt again for login until all browser (IE 6) windows are...
1
by: SPQR | last post by:
Some time ago I set up a webcam at home and a page on my site. Every three minutes the webcam would take a picture of my backyard and ftp it to my site where it was displayed on my webcam page. ...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
17
by: Jim Little | last post by:
Hello, I'm driving myself crazy either because I'm missing something about ASP.NET, or what I'm trying to do simply can't be done. First, I am not using session variables to track state. My...
1
by: IkBenHet | last post by:
Hello, Currently I am using a large input form on a website that is based on ASP and JavaScript. Depending on the values that are filled in by the user the forms does a refresh and makes...
0
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem...
8
by: Jason S | last post by:
Hi, is there any way of getting my VB (6.0) program to automatically 'Refresh' an IE window that might be active (window status not applicable). It needs to be able to determine which active IE...
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...
10
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.