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:

View 5 Replies


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:

`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

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

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?

View 4 Replies

Refresh Or Reload


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

Reload Vs. Refresh

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

View 7 Replies

Refresh To Reload The Page

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

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?

View 1 Replies

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:

View 8 Replies

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

But it's not working at all.

View 1 Replies

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.

View 5 Replies

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?

View 3 Replies

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

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

View 2 Replies

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.

View 2 Replies

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.

View 3 Replies

$_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:
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

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.

View 1 Replies

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

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

View 1 Replies

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.

View 14 Replies

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.

View 2 Replies

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.

View 1 Replies

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:


$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

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?

View 1 Replies

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?

View 1 Replies

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

View 1 Replies

Copyrights 2005-15, All rights reserved