How To Prevent A Whole Page Refresh
I built a site in PHP. All the site is working with the same URL, which is rachelkinarti.com. My paging is done with forms that sends the submit info to the same index.php script.
The problem is that every time a user is changing the page (via the main menu or other ways), all the page is refreshed (dissapear for a while and appears again with the new page), even though most of the page is unchanged.
Does anybody know what can cause that problem (maybe caching issues?) and how can I solve it?
View 1 Replies (Posted: October 23, 2007, 07:04:10 AM)
Sponsored Links:
Related Forum Messages:
Refresh To Next Page To Prevent Timeout Concerns?
I'm trying to manipulate my mysql tables with PHP but when I update them via PHP I have trouble with time out concerns. Is it possible to refresh or "start a new session" while continuing on from last session? So it doesn't time out? Or is it possible to somehow go to a new page to prevent time outs? Maybe switch over to a new page after 150 successful queries or after 10 seconds?
Posted: Nov 27 10 at 0:31
View 2 Replies!
View Related
Prevent Rerun Of Script On Page Refresh?
when I add/Delete data to my database (MySQL) using php, i discover that when i refresh the page my Add/delete script runs again and add (or attempt to delete) another copy of the record i added/deleted initially. How can I prevent a block of php script from running twice after clicking refresh button. ( I dont want to have to check the database to see if the record already exist).
Posted: Dec 11th, 2007
View 6 Replies!
View Related
Prevent Form From Submitting On Page Refresh?
I am trying to learn PHP. I have set up a database, a table, and made a form that allows me to add new rows to the table when the submit button is clicked. The problem is that the form also submits any time the page is loaded or refreshed, which results in a bunch of empty rows in my database table. How do I make it so that my PHP form only submits when the user clicks the submit button or clicks the enter key? [URL] Here is my HTML form: <form method="post" action="things-to-do3.php" class="form"> <div class="formfield">Person: <input type="text" name="person" /></div> <div class="formfield">Task: <input type="text" name="task" /></div> [code]....
Posted: Aug 20th, 2010
View 1 Replies!
View Related
Prevent Script From Re-executing Action On Page Refresh?
I managed to add new items in the cart, and the URL looks like below. [URL] The question is simple: How can I prevent from adding the same item again in the cart if someone refreshes the page? Cause now every time someone refreshes the page, it changes the quantity to +1 for the specific item.. Also, after moving to the checkout page, if they press the back button in the browser, AGAIN the quantity will change to +1;
Posted: Jun 7 at 14:45
View 4 Replies!
View Related
Prevent Variable Update After Page Refresh Without Javascript?
A friend of mine is developing a web application that's more of an online learning facility. On each page is a set of questions. He wants that when the use has answered all the questions on a page and submitted (and taken to the next page for the next set of questions), he shouldn't be able to go back to answer and resubmit those questions again. The idea is that "opportunity comes but once". He doesn't want to use javascript because it can be disabled which leaves him with server-side coding. He uses PHP.
Posted: Jun 1 at 12:11
View 2 Replies!
View Related
Prevent Duplicate Record Insert On Manual Page Refresh?
I have a problem which has only just surfaced itself. I'm working in a MVC environment. The method names in my interface class match those of the request module and action i.e. ?module=test&action=action would result in a method called public function test_action() { } In this particular problem, I have a form which submits to itself. If validation passes, a record is created and I then show the template of another module. This module expects a series of post variables as it is used in two modules. The problem I'm having is that, if the user successfully passes the validation and attempts to F5 the page, another new record is created etc. How can I prevent this from happening? Normally I would header redirect after a successful insert but in this instance I can't.
Posted: Sep 16 10 at 13:10
View 5 Replies!
View Related
Best Way To Prevent Refresh Rerunning Php Code In Script
I have a fairly simple PHP page, which takes form input for a message, and on pressing the send button, it sends an email out. The problem I have is that when a user presses refresh, it sends the email out again. I use a form action to send a hardcoded value of sent=1, which reruns the script in order to send the email out. So when pressing refresh, it still has this value of 1 set, and hence the issue. Does anyone have any advice on how best to deal with refresh, so its not processing the form again?
Posted: July 23, 2007, 04:27:05 AM
View 2 Replies!
View Related
Refresh Problem - Last Command Gets Re-executed - How To Prevent?
Working on the PHP DB I took over I have just come across a problem. When the user presses refresh in some circumstances the command they just performed will be re-performed. In some cases this is very undesirable. Further example: There is a PHP page in my web application that has a text box and the ability to add a note to the account the user is currently viewing. When the user presses submit the page reposts to itself with a hidden command parameter so the form knows what to do before redisplaying the account details (with the new note). However if the user presses refresh, the command gets re-executed again and we now have another identical note added to the account. Not desirable behaviour particularly when it comes to editing / deleting items etc. Bearing in mind this is a large application that will have many pages to change and a Monday deadline for new changes, what is an easy way I can prevent this? How do other people cope with this? Maybe from the start the whole thing should have been approached differently but I have to work with what I have.
Posted: July 17th, 2005 01:02 PM
View 3 Replies!
View Related
Prevent Duplicate Record Insertion On Refresh Without Redirecting?
I have this bit of script: if (isset($_POST['comment_posted'])) { $user_comment = mysql_real_escape_string($_POST['user_comment']); $add_user_comment = Event::addUserComment($id,$user->user_id,$user_comment); } After a user submits his comment, and refreshes the page, he is being presented with the "you are going to resend the post data" warning. And if the user accepts, it will re-insert the user comment.I understand that I can prevent that by adding using the header function and redirect the member to the same page. Is it possible to solve this issue without redirecting the member?
Posted: Jan 30 at 12:09
View 2 Replies!
View Related
Refresh Page - Or An Absolute Refresh Not Reload.
If the image content for image1.jpg changes, but the file name image1.jpg does not, IE6 does not show the new content unless F5 is pressed. If I reload the page using http://domain.com/view_pictures.php the image does not change. If I use a header("LOCATION: http://domain.com/view_pictures.php"), the image does not change. I have tried several ideas to force the reloading of the image file with no little success. I cannot change the image file name. Even if I add another a second image, the first image does not change. IE must use the file name to determine if it should reload the file. But F5 works. Is there a means in either php or JavaScript to call (force) a F5-keyboard command? or an absolute refresh not reload.
Posted: July 17th, 2005 08:37 AM
View 1 Replies!
View Related
Prevent Memcache Storing An Incomplete Page When Someone Clicks Away Prior To Page Load Completion?
I'm fairly new to memcache so apologies if this is an obvious one. I have looked through the memcached documentation and tried various Google searches but to no avail. The setup : Drupal 6.19 Memcache API and integration module Authcache module Centos 5 Memcached 1.2.6 If you need further information let me know. The situation: Memcache is certainly running, bins are being filled and page load times are incredible. However, I noticed only recently, when doing some testing that when I clicked on a link before the page had finished loading memcache stores the current page state in memory. So, when the next user comes along he sees a half formed page that I was too impatient to wait for. Your response might be to sort out my page loading - which I'm looking in to. But I would like to solve this one as well. This means that if a user with a particularly slow connection is the first one to visit a page then he / she might click away and store an incomplete page for everyone else to see.
Posted: Oct 14 10 at 22:42
View 2 Replies!
View Related
Refresh Problem - Warning: Page Has Expired The Page You Requested Was Created Using Information
i got two php page at the movement, which they called edit2.php and edit3.php. when i submit a form from edit2.php to edit3.php, then i could not come back from edit3.php to edit2.php. Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. Code:
Posted: 10:05 am on Dec. 20, 2006
View 1 Replies!
View Related
Page Refresh Without Relaoding A Page And Calling External Files In Ajax?
I have a profile page where im showing the friends of that user from db, I'm using auto scroller that works fine if I place that data directly in main file not an external file, Also I have a drop dowwn that on selection will sort the friends records accordingly, but as i have moved the code to main file, i need to make ajax call to same file not an external, to repopulate data with required sorting.Please let me know how can i do this on same file with ajax. On selection of drop down value.
Posted: Jun 8 at 14:19
View 2 Replies!
View Related
Prevent Included Htm Page From Being Loaded Outside Of Parent Page?
I have a page thisfile.htm, which is included in thisfile.php I used to load thisfile.htm into an iframe on thisfile.php but because of iPad scrolling trouble, I recently converted everything to scrolling divs and php includes. I need to prevent the htm file from being loaded independently of the php parent. When I used iframes, I had no problem doing this with some javascript. But I can't get it to work with my php include - I get a loop. This is in child: <script type="text/javascript"> if(top.location.href==self.location.href) { location.replace("thisfile.php"); } </script> This is in parent: <div class="bigdiv"><?php include "thisfile.htm" ?></div>
Posted: Jun 28 at 22:28
View 2 Replies!
View Related
Redirect A Page And Load/refresh A Div Within That Page Using Ajax?
I am using ajax to redirect to a page by window.location = "page.php"After the page is redirected I need to load a div within that page. For example search.php. I have been reading up on how to do this and from what I gather you can do this by using jquery. I have never used jquery .If it can be done without jquery even better! Edit: Let me explain again what I am trying to do. I have a table that updates that the db. All of it is done through php, js and ajax. For example "Displaytable.php" displays the table. The user can search and it replaces the search result in a div. When someone wants to update it goes to update.php. After it's updated i want to redirect the page to Displaytable.php with the search results in the div. I am using session variables to do the search. The search works fine i have tested it in another page.
Posted: Jun 3 at 19:04
View 2 Replies!
View Related
Automatic Page Refresh Without Reload Of Entire Page?
refreshing a top bar just like facebook where the no of messages are getting updated when the new messages comes just like facebook or gmail without refreshing the whole page . i can do this if that top bar is located externally i can refresh that bar with either meta tag set timeout or with refresh tag , but not getting how to refresh when it is part of main page.how to do this without reloading whole page and without any external file as the full code of the inbox and alert is located in main.php so i cant take it out and call these function externally.
Posted: May 15 at 12:44
View 5 Replies!
View Related
Page Caching - Content Does Not Change When Refresh Page
I am trying to experiment with page caching. I would like my page to be cached by the browser for 15 mins. Because the page content does not change much but it downloads thousands of the same records from the database every time the page loads. I am generating the following header: <meta http-equiv="Expires" content="Mon, 21 Sep 09 14:26:47 +0000" /> <meta http-equiv="Cache-control" content="private" /> with the following php code: gmdate(DATE_RFC822, (mktime() + 900)); I am also printing out the the current time on the page to check if the page is really being cached or not. echo date("H:i:s"); It is my understanding that the time would not update on the web page if the page is really being cached. Unfortunately it's not
Posted: Sep 21st, 2009
View 5 Replies!
View Related
Launch New Page And Refresh Exisiting Page
I know about not being able to change header info after output to the browser but what are the workarounds if any? I have a basic form where a user logs in - the details they submit are verified in supportlogin.php and then if successful I launch another browser window with Javascript but the window in that they logged in at remains on supportlogin.php and is blank... How can I launch the new window and send the first window back to the login page? PHP Code:
Posted: September 16th, 2003, 07:01 AM
View 2 Replies!
View Related
Refresh Page With New Contents Without Leaving The Page?
Basicly what i want to do is: i have a bunch of links. when i click that links the dynamic content from a mysql db appear above the links. I need to do this without open a new page because i'm using mootools with the acoordeon script, and inside each "tab" theres contents. when i'm inside one tab i want to have links, and clicking each link new contents appears. When i do this opening a new page is easy, i just put on the links something like newpage.php?id=games and then the page newpage.php open and the recordeset from games is echoed. but how to do that without leaving the page? refreshing or something like that.
Posted: October 25, 2007, 07:07:33 AM
View 1 Replies!
View Related
Cookie - Page Load Or Page Refresh
this is supposed to show file1.txt, then file2.txt and so on on page load or page refresh. But it only shows the first 2 txt files. Can someone help me find out why? I would think that as long as the cookie is still the same if (isset($_COOKIE['e'])) { setcookie("e", $a++, time()+60*60*24*30);} that it would go to the next text file but its not. Please let me know, thank you very much. <?php $max_files = 12; $a = 0; if($a == 0) {setcookie("e", $a, time()+60*60*24*30);} /* expire 30 days*/ if (isset($_COOKIE['e'])) { setcookie("e", $a++, time()+60*60*24*30);} if ($a == $max_files) $a; $include_file = "file" . $a . ".txt"; include ($include_file); ?>
Posted: 10:41 pm on May 22, 2007
View 1 Replies!
View Related
Changing Text On A Page Without Page Refresh?
I am a complete PHP noob and whilst I have done some HTML and CSS, I am not even sure if PHP is the best way of doing what I want to do. I am also not sure of the correct way of phrasing what I am trying to do, so unsurprisingly, I haven't found anything in the forums or on the web. I want to avoid using Javascript if at all possible. Here is my sample code: <table width="660" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> [Code]..... As hinted at in the above code, when one of the unordered list items is clicked, it should update the body text below, either with a couple of paragraphs of text stored in a variable in the page, or maybe stored in a separate text file, I don't mind which. My biggest aim is not to need a page refresh to update the text, followed closely by not using Javascript.
Posted: Posted 08 June 2009 - 07:11 PM
View 12 Replies!
View Related
$_POST To New Page Not Working After Page Refresh?
I have a dynamic drop down that allows me to select an item. That item is posted to a new page that I run a query against to build/populate my form that I'm wanting to update a column in. However the issue is after I hit my submit button it no longer knows about my post variable. I get the following error. Quote...on line 39: Undefined index: mevent Code from drop down. This is in its own php file. echo "<a href=''>Manage Individual Event Result</a></br>"; $quer2=mysql_query("SELECT DISTINCT event FROM er1 order by event"); // End of query for first list box [code]....
Posted: Jul 23rd, 2010
View 2 Replies!
View Related
Tell The Difference Between A Page Refresh And Closing A Page?
I have a web app game and while in the game I want to have it so if a user closes the page or their browser, it will automatically log them out. I tried using the onbeforeunload event attached to the window: window.onbeforeunload = function() { // perform logout functions here } The problem is, that will also fire if the user refreshes the page. Is there a way I could detect whether or not the user is completely closing the whole page, or just refreshing it?
Posted: May 17 09 at 20:09
View 4 Replies!
View Related
Populating Array With Variables / I Have Code In Place To Prevent This On The View Cart Page, Just Not The View Product Page?
I'm trying to create a basic shopping cart, having an issue with the product page allowing users to add more items to their cart then are in stock (I have code in place to prevent this on the view cart page, just not the view product page) This is what I have so far; for ($i = 0; $i < $numItem; $i++) { extract($cartContent[$i]); $subTotal += $price * $cartQuantity; $cartLimiter[$itemNo => $cartQuantity]; Using an array so the position number becomes the item number and the cart quantity becomes the assigned value, however it doesn't seem to like it and throws out on the bottom line of code: Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ']'
Posted: Mar 23 10 at 23:38
View 3 Replies!
View Related
Refresh Index.php Page From A Different Page?
I have a form (form.php) which calls and executes code in post.php to place form data in mysql. The form is a popup ajax form and after I submit the form, I want the index.php page (where the link to my form resides) to refresh. The form is submitting data to mysql which then appears on my index.php, but currently I have to refresh index.php to see it.
Posted: May 19, 2010, 03:45:08 PM
View 1 Replies!
View Related
Php Page Refresh
I have a Problem with Page refreshing in PHP, I tried all the available solutions from Forums but nothing helped me to solve the Problem, Here is My Requirement 1. I have a php page with list of Products say products.php 2. I went to newproduct.php from products page to add new product 3. Once the new product is added it comes to products.php in which it should show the products list with newly added product but it's not. 4. when i clicked on Refresh it is showing all the products including newly added product. 5. I added header with no-cache, must revalidate at the begining of each php page.
Posted: February 28th, 2003, 01:47 AM
View 1 Replies!
View Related
Page Refresh
Now I have a drop down box, I select a user, hit approve and it updates their status in the database and SHOULD remove their name from the drop down box. If I refresh the page a 2nd time after I click on the submit button, or if I approve another user, it will remove their name. But it always takes 2 page refreshes to remove their name. How can I make it so after I hit the approve button, their name is removed from the drop down list?
Posted: October 22, 2007, 03:23:28 PM
View 14 Replies!
View Related
|