Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


Advertisements:




SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Keep Form Input After A Refresh/reload


I am not sure if I should do this via JavaScript or PHP, but I am going to give this forum a try to see if I can get help on this problem.

I have this form, whose page will be reloaded to add new values to its drop down menu via php from a mysql database. In order to pull the newly added values, this page needs to be reloaded.

I want the user to keep all the data they have written thus far after the reload. I need a script that will allow to store those values temporarily (without a submit) so that the user need not type them again. Code:


View 5 Replies (Posted: 08-01-2005, 06:21 PM)

Sponsored Links:

Related Forum Messages:
Form Reload : If User Click The Reload Or Refresh In IE, There Is A Warning Window Popup?
I am writing a very simple code which involve HTML, PHP and Mysql, here is what I have done and the Help I need: the 1st file: index.php

PHP Code:

<!DOCTYPE html><html lang="en"><head>   <title>Testing Site <?php echo $_GET[id];?></title></head><body>    <?php     if($_GET[id]){     require_once($_GET[id].'.html.php');    }else{     require_once('bb.html.php');    }    ?>         <?[code]....

the DB/table related: I have a DB named mydb in MySQL, which have on table, comments:

Code:
CREATE TABLE IF NOT EXISTS `comments` (
`user` varchar(30) NOT NULL,[code]...

load index.php after you creat the table using above sql..and jump between index.php?id=aa and index.php?id=bb, and u can submit the form and see the comments imm showing after ur submit...it looks great, BUT My problem: if user click the reload or refresh in IE, there is a warning window popup, and remind user not re-submit, but if some user really resubmit, my table will have duplicate record...no change on my entire scripts stucture, means I must use above ?id=$_GET(id) tech to jumping between the aa file and bb file, and I must include both form and insert process in same file, the user expriense should not been impact........

what I need is while user click the reload, no pop window, no duplicate record been insert

Posted: Oct 29, 2009, 02:16

View 14 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
Reload A Form After An Input Type="file" Changes?
Is it possible to reload a form after 'file-input' change?

I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it is possible to reload a form OnChange of the file-input and then call the php code which uploads the picture, so that the user can preview it? Does the php file have to be the same file as in the ? or can I call another php file for the image upload only, with javascript?

NOTE: The user will be able to upload multiple pictures...

UPDATE: No ajax... can this be done without it? No problem for me if the page reloads, but with the image this time... can it be done?

Posted: Nov 9 09 at 14:22

View 4 Replies!   View Related
Refresh Or Reload
Hi!

I need to make a webpage refresh using code, I don't want that the user uses the refresh button (you know! always forget to do it)

So, how can I do to do that in PHP?

Posted: February 1st, 2002, 12:31 PM

View 1 Replies!   View Related
Reload Vs. Refresh
Is there a difference between reload and refresh? How is this coded in the header?

Posted: August 09, 2007, 09:28:04 PM

View 7 Replies!   View Related
Refresh To Reload The Page
i was using header("Location: http://test.com/alt.php"); on my php page as a refresh to reload the page as i need to refresh the whole page but hold my sessions i set to rest the forms on it.

but then i had to create a header redirection page in  the website to have get the websites template page on the page i created for the  menu logo  etc. so turning the original page into a redirection to achieve this.  So now my php page is in zen cart and is called in on the first the redirection nut when i try and use a second header location it doesnt work.

Posted: July 29, 2007, 08:02:17 AM

View 2 Replies!   View Related
Server Can Not See Cookie Until After Second Reload/refresh?
I'm sending the code that displays messages only when the server does not see a cookie. However unlike ASP PHP does not see a cookie until the second reload. This would have the code and message appear after the user has made a choice and I'd have to make the page reload so the server sees the cookie (on the second reload) and then does not send the code/message on the third load, but I want to avoid this. What is this issue? How can I get around it?

Posted: 10:33 pm on Jan. 18, 2006

View 1 Replies!   View Related
Reload (refresh) Page Within An If Statement
Is there a simple way in php to reload a page coded within an if statement.(see code below)It's very important that the session stays intact. Code:

Posted: November 28th, 2006 11:25 AM

View 8 Replies!   View Related
Refresh Div Content Without Reload Page?
I'm having some trubles when update the div content without reload the page.I'm using jquery, php and mysql as well.Well I've tryed:

$('#divId').load("script.php", function(){
someFunction();
});

But it's not working at all.

Posted: Jun 9 at 10:53

View 1 Replies!   View Related
Reload / Refresh On Back Button?
Code: [Select]<?php
header("Cache-Control: private, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
echo date('l jS of F Y h:i:s A');
?>
^^Does not work, except IE7

When I click on a link off of the above page, then hit the back button on the browser, I need the page to reload so that the new 'date' will be echoed.

Posted: June 20, 2011, 10:56:15 AM

View 5 Replies!   View Related
Reset All Fields When Page Reload / Refresh?
how to reset all the fields in a page, when i do explicitly reload or refresh?

Normally, select boxes are not reset after reloading the page, why?

How to reset select boxes when an user reload/refresh the current page using browser reload/refresh button?

Posted: Feb 14, 2011, 01:05

View 3 Replies!   View Related
Save The Checkboxes Session And Let Them Refresh Or Reload?
I am trying to use PHP session variables with checkboxes. My page has 3 checkboxes and those display and hide data according to check and uncheck. This page automatically refreshes every 5 mins. I want to save the checkboxes session and let them be the same on refresh or reload.I am passing the values of the checkboxes that is (on or off) via ajax to another page so that I can get them back on the main page. No matter whatever I do, the boxes are always on.

Main page code:
Code: [Select]session_start();
 /* Includes */
date_default_timezone_set("UTC");[code].....

Posted: June 09, 2011, 11:48:31 AM

View 10 Replies!   View Related
Make Website Refresh Or Reload By Itself In (HTML) Code?
i need make my web sity refresh itself every 5 min in HTML code.

Posted: Jun 28 at 2:41

View 2 Replies!   View Related
Jquery / Ajax Refresh Without Reload Or Load The Page?
I have a report page which dynamically generate the record and saved in the database. From database i need to show the dynamically updated records in the page without reload or load the contents using setInterval time function.

Posted: Apr 27 10 at 13:05

View 2 Replies!   View Related
Reload Zend Captch Image On Click Refresh Button?
I apply a zend captcha in my php page now i require to add captcha reload button.

Posted: Apr 21 at 8:53

View 3 Replies!   View Related
$_SESSION['message'] : When I Hit Refresh And Reload The Page The Number Doesn't Increment?
It's working to my favor but I don't trust it unless I know why it's working.Real world example:

I reference $_SESSION['message'] twice in my code.First looks like this:[code]...

Second looks like this:echo $_SESSION['message'];

For some reason, this is working for me and $_SESSION['message'] is getting unset after it's echo'd (but the user remains logged in so I know the entire session is not getting unset).

Test example: I put the following code in test.php:
<?php
session_start();
$_SESSION['message']++;
echo $_SESSION['message'];
?>

When I hit refresh, reload the page, etc. the number doesn't increment, it's stays as '1'. If I change it to $_SESSION['success_message'] the number does increment.So? Is $_SESSION['message'] reserved? Does it automatically reset once it's echo'd? I didn't find anything in the manual on this.

UPDATE:I just checked in Firefox and test.php works as expected. In Chrome it doesn't. Chrome does so many wacky things, I wouldn't be surprised if it's resetting $_SESSION['message'].

Posted: August 23rd, 2010, 01:47 AM

View 9 Replies!   View Related
Avoid The Message 'warning Page Is Expired, Press Refresh Button To Reload?
how to avoid the message 'warning page is expired, press refresh button to reload' when we press back button in php.

Posted: Jun 8 10

View 1 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
Reload Form Element Without Loosing Form Info
I have a upload image page which a user can upload image and some description to go with it.

My need is the user would like to be able to create a folder before uploading his image but during have filled the form.

The problem is that the list box which list folders will need to reloaded with out loosing all the data filler in the from ?!??!?

Posted: 11-19-2007, 06:13 AM

View 1 Replies!   View Related
After Refresh The Input Gets Inserted AGAIN In The Database?
After I've successfully inputted something in my script and then click refresh in Chrome with "Right Click -> Reload", the same thing that I've inputted before gets re-inserted AGAIN into the database, thus resulting in multiple versions of the same thing in the MySQL database.

How can I prevent that?

p.s. Chrome is warning with a pop up of repeated action, and when I then click continue the repeated insertion of the data occurs, and I'd like to prevent the repeated insertion.

Posted: January 22, 2011, 02:02:46 PM

View 14 Replies!   View Related
Display Latest Input Without Refresh Page
I have a mysql database that store the results of a game. This database will frequently update (new result will insert after game finished). There is any script ( i think javascript) that will display the latest result without refresh the page.

Posted: September 26th, 2003, 11:23 PM

View 2 Replies!   View Related
Php Form Reload
I want to make a search form which contains make, model and year of make as search condition. All these information should be taken from the database. After selecting the make the model selection menu should take the value which is coming under the same make. Is it possible to reload the same page and take the value from the database. or it is possible to add a select table values where the select query contains a criteria which is taken from the same just before that.

Posted: August 7th, 2003, 04:07 AM

View 1 Replies!   View Related
Reload Form
I am have trouble with the following code. It works fine the first time thru but will not reload the form for subsquent use. HTML Code:

<?php

if($submit)
{
$link = mysql_connect ("mysql145.secureserver.net", "glamorous", "cem3956")
or exit ();
mysql_select_db ("glamorous")
or exit ();

echo $store;
$sql = "insert into store (store) values ('$store')";

$result = mysql_query($sql);

................

Posted: 02-15-2007, 07:46 PM

View 3 Replies!   View Related
Reload Form Data
I am developing a web site using php. I have a form for login in page1, which has two input box and a submit button. When I click the submit button in page1, it runs page2. When I click BACK button(now in page1), and FORWARD button (supposed to be in page2). Both IE and Netscape give me a message like the following (note: the browser cache is not turned off either by php header() or by browser setting):
*********************************************
This document resulted from a POST operation and has expired from the cache. If you wish you can repost the form data to recreate the document by pressing the
reload button.
*********************************************

When I press the RELOAD button, page2 is load correctly. Now, how can let the browser automatically do the reload without showing me the above message?

Posted: December 28th, 2000, 03:58 PM

View 1 Replies!   View Related
Form Resets After Reload
i just set up a validation on this form but when there is an error and the user hits back to fix it, all the fields are reset. Is there a code to fix this?

Posted: 4:22 pm on Dec. 8, 2006

View 1 Replies!   View Related
After A Few Seconds The Form Will Reload?
I have a php  form once submitted a confirmation is displayed to the user,( "Thank you for your comments"  ) how can I have this on a timer so after a few seconds the form will reload.

echo $success_sent_msg;
?>
<!--&nbsp;Message&nbsp;sent!&nbsp;(change&nbsp;the&nbsp;text&nbsp;below&nbsp;as&nbsp;you&nbsp;wish)-->
<div style="text-align:left;">                  
<p>Thank you <b><?=$name;?></b>, for your comments.</p>
</div>
<!--End&nbsp;Message&nbsp;Sent-->
[Code]....

Posted: May 12, 2010, 04:17:05 PM

View 1 Replies!   View Related
Can Header() Do A Div Reload Without A Page Reload (ie Ajax-type)?
I have a display page (displaypage.php) divided into two panes - one for content and one for feedback, referred to in the CSS as contentDiv and feedbackDiv respectively.

When I click on a word in the content pane, I do a PHP/PostgreSQL search for similar words, and the results appear in the feedback pane without a page reload. For this, I am using a very basic Ajax setup Code:

Posted: October 17th, 2006, 10:17 AM

View 2 Replies!   View Related
PHP Form Keeps Resending Information On Reload.
I have PHP form that is basically a contact page when the user clicks on submit. I have the page update with your message that says it has been sent, but now if the user clicks on reload it ask to resubmit the information over again. And that's where i want to stop this so when the user clicks on reload it will not resubmit the information again. How can this be done?

Posted: 7:18 am on Dec. 8, 2006

View 1 Replies!   View Related
Reload The Same Page With A Form After Submit?
I have a page with a form, and the code to process the form answers, I want the same page/form to just reload when the user presses submit. The only function I have found is that location command. PHP Code:

Posted: November 18th, 2001, 03:02 PM

View 10 Replies!   View Related
Page Reload On Form Submit?
I've been stuck on this problem all day. Help would be greatly appreciated:I have an 'edit' page.I have declared my variables up top to make "sticky" radio buttons when somebody goes to edit the form.I have it submitting successfully, however if I go back to "confirm.php" with the form action, the content that was just submitted doe not display on the page.If I use PHP_SELF, the content in to form reverts back to what it was before it was editied, however the table was updated.

<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
<!-- ---------------------- -->
[code]....

Posted: Jul 4 at 3:52

View 1 Replies!   View Related
Saving A Form State On Reload?
saving a form state on reload? I know it can be done with JavaScript and cookies but I've got a hierselect element (2nd dropdown is dependent on selection from 1st dropdown) that seems to throw a wrench in things. Is there something built into quickform?

Posted: June 18, 2010, 11:46:43 AM

View 7 Replies!   View Related
Reload Page Without Submit Form
i have two radio buttons: 'Accept' and 'Don't Accept' when the form submit button is pressed and the 'Accept' radio is not checked i want the page to reload without sending the info accross.

[code]...

none of the above work as it keeps on sending the form and going to next page.

Posted: Oct 18th, 2010

View 4 Replies!   View Related
Validate Form Without Having To Reload Page?
how to validate form without having to reload page?

Posted: April 04, 2010, 04:07:46 PM

View 8 Replies!   View Related
Reload Page Without Form Data
As the title says im posting some form data to another php file that processes it. I then want to return to the orig. form to start over but the same data is still in the form. Whats the best way to go about making the form fresh.

Posted: May 29, 2010, 09:50

View 7 Replies!   View Related
Remember Form Data On Reload?
I'm wondering how to save drop down menu values. For example, say someone was filling out the form and they left a field blank, it would reload the page, and say please fill in this field or whatever, but how do I get it to save the drop down menu data. I know how to get it to save the input fields, just not the drop down menus.

Posted: June 26, 2011, 03:27:05 PM

View 6 Replies!   View Related
Form Submit, Force CSS Reload?
I have a PHP form that I need to force a CSS reload once submitted. How do I do this?

Posted: Jan 29 at 0:29

View 3 Replies!   View Related
Prevent Reload From Resubmitting Form?
I have come accross a problem with my php coding. I have a script which does multiple things in one file. Hoever, this problem can occur on single function scripts as well. The problem occurs when a form is submitted, and then the php script performs the processing on the form, and enters the information into a database. If the user hits a page reload or refresh, the script will re-perform its function and repost the information again into the database. What is the most logical way to prevent the resubmission of form information and reposting it whenever the user hits the reload button?

Posted: 10-02-2009, 09:40 PM

View 14 Replies!   View Related
JQuery - Store All Form Input Values In A Hidden Input?
I'm trying to create a interface with a conditional logic that will allow the webmaster to insert advertisments anywhere on the site.But before coding it, I need some advices from you :)The forms are handled trough jquery & ajax. When the "add another ad" button is pressed a new form is created with jQuery.My question is how could I gather all the form input values into a single hidden input that would look like:

<input name="ad[]" type="hidden" value="homepage,after_article,4,visitors" />

I think this value would be easier for me to handle in PHP.

Posted: Jan 29 at 17:21

View 2 Replies!   View Related
Losing Information On Form Error Reload
I have a self processing form that draws and email address from another page... When the form processes and error checks for empty fields the page reloads but that email is lost to the form will redirect but never send does any one know how to fix this?? Code:

Posted: 01-06-2006, 03:06 PM

View 4 Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved