Keep Form Input After A Refresh/reload

Aug 1, 2005

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:


Form Reload : If User Click The Reload Or Refresh In IE, There Is A Warning Window Popup?

Oct 29, 2009

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:

`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 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 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

View 14 Replies View Related

Refresh Page - Or An Absolute Refresh Not Reload.

Jul 17, 2005

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 the image
does not change.

If I use a header("LOCATION:"), 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

Is there a means in either php or JavaScript to call (force) a F5-keyboard
command? or an absolute refresh not reload.

View 1 Replies View Related

Reload A Form After An Input Type="file" Changes?

Nov 9, 2009

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?

View 4 Replies View Related

Refresh Or Reload

Feb 1, 2002


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?

View 1 Replies View Related

Reload Vs. Refresh

Aug 9, 2007

Is there a difference between reload and refresh? How is this coded in the header?

View 7 Replies View Related

Refresh To Reload The Page

Jul 29, 2007

i was using header("Location:"); 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.

View 2 Replies View Related

Server Can Not See Cookie Until After Second Reload/refresh?

Jan 18, 2006

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?

View 1 Replies View Related

Reload (refresh) Page Within An If Statement

Nov 28, 2006

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:

View 8 Replies View Related

Refresh Div Content Without Reload Page?

Jun 9, 2011

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(){

But it's not working at all.

View 1 Replies View Related

Reload / Refresh On Back Button?

Jun 20, 2011

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.

View 5 Replies View Related

Reset All Fields When Page Reload / Refresh?

Feb 14, 2011

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?

View 3 Replies View Related

Make Website Refresh Or Reload By Itself In (HTML) Code?

Jun 28, 2011

i need make my web sity refresh itself every 5 min in HTML code.

View 2 Replies View Related

Jquery / Ajax Refresh Without Reload Or Load The Page?

Apr 27, 2010

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.

View 2 Replies View Related

Reload Zend Captch Image On Click Refresh Button?

Apr 21, 2011

I apply a zend captcha in my php page now i require to add captcha reload button.

View 3 Replies View Related

$_SESSION['message'] : When I Hit Refresh And Reload The Page The Number Doesn't Increment?

Aug 23, 2010

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:
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'].

View 9 Replies View Related

Avoid The Message 'warning Page Is Expired, Press Refresh Button To Reload?

Jun 8, 2010

how to avoid the message 'warning page is expired, press refresh button to reload' when we press back button in php.

View 1 Replies View Related

Automatic Page Refresh Without Reload Of Entire Page?

May 15, 2011

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 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.

View 5 Replies View Related

Reload Form Element Without Loosing Form Info

Nov 19, 2007

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 ?!??!?

View 1 Replies View Related

After Refresh The Input Gets Inserted AGAIN In The Database?

Jan 22, 2011

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.

View 14 Replies View Related

Display Latest Input Without Refresh Page

Sep 26, 2003

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.

View 2 Replies View Related

Php Form Reload

Aug 7, 2003

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.

View 1 Replies View Related

Reload Form

Feb 15, 2007

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:


$link = mysql_connect ("", "glamorous", "cem3956")
or exit ();
mysql_select_db ("glamorous")
or exit ();

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

$result = mysql_query($sql);


View 3 Replies View Related

Reload Form Data

Dec 28, 2000

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?

View 1 Replies View Related

Form Resets After Reload

Dec 8, 2006

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?

View 1 Replies View Related

After A Few Seconds The Form Will Reload?

May 12, 2010

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;
<div style="text-align:left;">                  
<p>Thank you <b><?=$name;?></b>, for your comments.</p>

View 1 Replies View Related

Can Header() Do A Div Reload Without A Page Reload (ie Ajax-type)?

Oct 17, 2006

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:

View 2 Replies View Related

PHP Form Keeps Resending Information On Reload.

Dec 8, 2006

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?

View 1 Replies View Related

Reload The Same Page With A Form After Submit?

Nov 18, 2001

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:

View 10 Replies View Related

Page Reload On Form Submit?

Jul 4, 2011

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'] ?>">
<!-- ---------------------- -->

View 1 Replies View Related

Reload Page Without Submit Form

Oct 18, 2010

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.


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

View 4 Replies View Related

Reload Page Without Form Data

May 29, 2010

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.

View 7 Replies View Related

Form Submit, Force CSS Reload?

Jan 29, 2011

I have a PHP form that I need to force a CSS reload once submitted. How do I do this?

View 3 Replies View Related

Prevent Reload From Resubmitting Form?

Oct 2, 2009

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?

View 14 Replies View Related

Saving A Form State On Reload?

Jun 18, 2010

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?

View 7 Replies View Related

Validate Form Without Having To Reload Page?

Apr 4, 2010

how to validate form without having to reload page?

View 8 Replies View Related

Remember Form Data On Reload?

Jun 26, 2011

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.

View 6 Replies View Related

JQuery - Store All Form Input Values In A Hidden Input?

Jan 29, 2011

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.

View 2 Replies View Related

Losing Information On Form Error Reload

Jan 6, 2006

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:

View 4 Replies View Related

Form Values Not Changing Even On Page Reload

Mar 2, 2011

I'm using jquery to allow a user to click a row in a table to edit the contents of it. When the user clicks the row, a javascript function is fired which sends the row_id as a parameter and stores it in a hidden form. A function is fired which posts the row_id stored in the hidden form. The row_id is used in a php script to find the contents of the row which are stored as an array in a session variable. A div showing a form is shown on the screen, with the contents of the session variable in input field, to show the user the current values and allow them to be easily changed if the user needs to do this.

The first time the page is visited, and a row is selected this all works fine and the correct values are shown in the form, but if I close the form or click cancel and select a different row the values in the form are the same as the previous ones. Even stranger, if the page is reloaded after an attempt to select a second row, clicking any row the third time once the page is reloaded brings up the previous row selected before the page was reloaded. I have tried EVERYTHING and can't seem to make it work. Here goes with the code.

View 1 Replies View Related

Update Form And Not Load Or Reload Page

Mar 12, 2011

I have a simple command:

<?php echo form_open("sales/add",array('id'=>'add_item_form')); ?>

How can I make this command so it just updates the form, without reload or redirection. I dont even need to see the form. I have tried all sorts of methods, but wondering if there is something simple here I am missing. I just need to post the data. This is what is outputted by codeigniter.

<form action="" method="post" id="add_item_form">
<label id="item_label" for="item">

I have tried jquery but still does not work.

View 3 Replies View Related

Show The Last Selected Value From The Drop Down List Box After Form Reload?

Feb 2, 2010

Is it possible to show the last selected value from the drop down list box after form reload?

View 5 Replies View Related

Combining Form Post With Multiple Drop Down JS Reload

Feb 2, 2011

So basically I have a form that submits a new article to the database.

When submitted, the page validates the entries and displays errors and uses $_POST to repopulate the fields to allow the user to fix the errors. This works fine. Here is the code:

<form name="form1" method="post" action="newArticle.php?action=add">
<p>&nbsp;Title:<br />
<input name="title" type="text" id="title" size="30" value="<?=$HTTP_POST_VARS['title']?>">
<p>&nbsp;Tagline:<br />


My problem is that the form fields are empty after a reload from using the dropdowns, essentially meaning the user must start again.

Is there a sensible way to make this work, or an alternate way to populate the fields on post/reload? It seems a complicated way of doing things.

I would much prefer to use PHP to update the dropdowns using post but I ran into problems when changing the fist dropdown after the others had been selected.

View 1 Replies View Related

File Form - Keep Local Path Info On Reload

Nov 2, 2007

Is there a way to retain the local path info for a file form when the page reloads?

View 1 Replies View Related

Form Validation :: Reload The Page With Red Error Message

Apr 3, 2007

I wrote the following form so that if a user leaves a field blank the page will not process and instead be re-loaded with a red error message asking the user to enter the missing information: Code:

View 1 Replies View Related