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




Canīt Load Page Before Refresh??


Why my pages donīt appear after linking to them (.php3), I have to Refresh the page and then it appears. And of course I loose the passed information from previous page??? This is REALLY bothering me A LOT. Please, does anyone know the answer???




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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:

Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

Can You Use PHP To Refresh The Page?
I would like a user to be able to click a link and the page will refresh, like pressing the refresh button on the browser. Can you do this in PHP?

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.

Refresh Page With Php
Was wondering how you would get the browser to update the data in a table, would it be possible to have PHP refresh the whole page?

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

Page Refresh
Is there a php function that will refresh a page, similar to JavaScripts location.reload()? I read somewhere that location.reload isn't supported in all browsers, so I want a php function that will be supported on most browsers.

Page Refresh
How do I stop a particular form from reposting everytime I press refresh? it is possible to use some sort of session variable to control it?

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?

Refresh The Page After Submit
Does anyone know how I can automatically refresh the page after the script is executed ( after user hits submit) and the database is updated, so that the line "The main office is now..." shows the new entry into the db? Thanks.

Refresh Page Code?
What code do you use to refresh a page after X number of seconds?

Refresh The Previous Page
This is a project that I am attempting in which a user is allowed to submit a programming code which the server will run.
The user submits the files from the client side. the user details will be written to a mysql database and the code is run. at the end of code run, the result will be posted back to the client which will then show a table of submissions made. Thus I reckon I need to perform a refresh on the client side but how do you go about doing this in php.

Sense Page Refresh On IE
I am able to sense page refresh (as opposed to submit) on firefox but
the code does not work on IE.

On firefox, $_SERVER['HTTP_CACHE_CONTROL'] returns 'max-age=0' but on
IE it always returns 'no-cache' which is why the code fails. How can i
sense page refresh on IE?

Page Does Not Refresh On All Browsers
I have a web page I wrote for a class assignment (which I embellished a little) that doesn't seem to work on all browsers, platforms, etc. The problem appears to be that the page doesn't refresh completely when the page calls it self. The refresh (which should happen when the form action
fires) should reload a file into an iFrame, but it doesn't. I do have 3 submit buttons on one form, but it works well for me. On the machines that don't display the results properly a click of the Refresh (or Reload) button retrieves the new data?

The link to the page is:

Login / Log Out - Need To Refresh Page?
I got a login / logout script that resides on the same page. Basically if the URI includes action=logout I call a logout function that kills all the session variables. Otherwise I try to log in using the posted data, or do nothing if the form wasn't posted.

My problem is that I have somewhere on the page a small piece of code that says: 'You are logged in - <link>logout</link>'.

Now upon successful login this piece of code does not appear (until I refresh the page or navigate away from it) and similarly the piece of code still appears once I am logged out (until I refresh the page or navigate away from it).

Page Doesn't Refresh To Current One
I have a comment/feedback section to my website.  After a person enters their comment and submits it I was hoping to have it refresh the page with the current page and their comments now displayed, but it is redirecting me to another page that I include. Code:

How To Refresh A Html Page Using Php?
eg
echo "testing";
echo "testing";
echo "testing";
echo "testing";
echo "testing";

 if(isset($_REQUEST['button'])){
//what should put in here to refresh the page?
}

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?

Refresh The Page On Click
I'm trying to find a way to refresh the page upon the clicking of a link that does not use header's.

reason being there isnt anyway i can get the statement up above all the output.

The only way ive found of doing something similar is:

<META HTTP-EQUIV=Refresh CONTENT="3; mypage.php">
Which just refreshes the page every 3 seconds.

Not really suitable to be honest.

Can anyone think of another way to handle this?

Using PHP To Load Another Page Or Html Page
Ive got a PHP script, which if it ends correctly, i want load another
PHP file or an HTML page automatically, ie without user intervention.
The new page shoud replace the current page on the browser. Is there a
PHP command or function which does this?

Clear GET & POST Value On Refresh Page
Hi everyone.

when I fill a form and then submit it , it works right
[address?value=sth]

But I wanna if then form refreshed by user, address changes to
[address] without POST & GET.

Stop Sql Insertion On Every Page Refresh
The page has a form which basically take in a file name, and and upload button does the uploading.

the php code at the top of the page takes the file name and insert the name into a database.

the problem is: everytime the user presses the refresh button, a new entry is inserted into the database.

IE+Page Refresh+Resubmitting Data
I am in the processing of developing a site making use of PHP and MySQL. The problem I am experiencing is that when I refresh Internet Explorer, the data that was processed by a form is resubmitted to the database - can anyone tell me what the correct process is to avoid having this happen. The only thing that comes to mind is to, after the processing is complete, redirect to another screen - ultimately I would like to avoid doing that.

Forcing Queries/php To Refresh Page
let's say I have a page listing records in a table... If I go somewhere else and later on reload this list page, it does NOT refresh the list (if more records were added to the table meantime). What should I do? Is there a way to force a refresh?

If I turn off the cache, are people still going to be able to cache the graphics (i don't want to force a reload of every element, just the page itself)?

MySQL DELETE: How To Get Page To Refresh?
I have a script that deletes records in a table. It works fine. However, it redirects the browser back to the page and the record stills shows there. Only after the page is manually refreshed does it disappear.

I've used both header("Refresh...") and header("Location...") to accomplish the redriect, but no dice. The only thing that seems to work is if a unique URL is pushed into the address bar, which I do by appending md5(microtime()) to the end of the redirect URL.

Refresh Page After Hitting Back Button
I have a page with Dropdowns that are linked to a database.
After selecting one of the options and going to the next page, it will display the results of that dropdown item as pulled from the database.

If a user hits the back button, then selects a different option and hits "submit", what is listed is the results of the first selection AND the results of the second selection.
Is there a way to either:
1. Refresh the page upon hitting the back button on the browser
2. upon hitting the back button, the browser forgets the selection previouslly made.

Redirect Web Page (php, Javascript Or Refresh Meta Tag)
I'm new to Search Engine Optimization thing... I want to
redirect www.oldpage.com to www.newpage.com. BUT I want the search
engine to CRAWL only WWW.OLDPAGE.COM. I'm dont know what to use:
refresh meta tag or PHP or javascript. I'm not really sure the benefits
of these 3 languages.

Refresh Page To Update Table (every Minute)
I fill my table from MySQL tables. Each 1 minute i need to update table contents according to the changes in database(made by another people)Can i do it in php? And how?

Page-refresh Problem When Using Include(file.txt)
Suppose you have webpage called fileA.html which contains a line to include("fileB.txt"). When you load the page, the server inserts the contents of B into A and everything is good.

Next, you modify fileB and re-load the page. The browser looks at the file it is told to re-load, i.e. fileA.html, and since fileA.html has not been modified the browser uses a cached version of the page that does not include the new fileB mods. Hence, the newly modified page does not appear to a user to have been updated.

Is there any way to get around this, i.e. to force a full re-load each time a page is accessed? I know this isn't really a php question as it's more a browser than a programming issue, but I warned you about that up-front, don't say you didn't know what was coming.

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.

Firefox Resubmits Data On Page Refresh
How do I stop firefox from reposting post data when my php page is refreshed?

Page Load For IP
Is there any way only a certian IP address on our network can see a
particular Table on the page? or if a certian ip Adress goes to our intranet page load a certain page depending on that IP address.

How To Load CSV Onto PHP Page
is there a way to load CSV file into a PHP page? if ever, how and what is the code?

Page Refresh Problem: An Interesting Solution I Found
I don't know if anybody faces this problem much, but I have faced it
lot of times that page refresh causes the data to enter twice or
request twice. Or, at least a message "Do you really want ..." which a
normal user may not understand.

Today morning, I got an interesting solution and I tried. It worked!!!

if($_POST["a"]){
//do necessary jobs for posted data
header("Location: ".$_SERVER['PHP_SELF'] );
}

WWW-Authenticate: How To Force Password Login At Every Page Refresh ?
<!--
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 closed and the
same page is opened.
I turned off all caching but still it does cache (as a refresh doen
not promt again).

How can I force the page to prompt for a password at every refresh

-->

<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<?php

$showall = false;
error_reporting (E_ERROR);

if (($PHP_AUTH_USER != "myname") || ($PHP_AUTH_PW != "mypass"))
{
header('WWW-Authenticate: Basic realm="Secure Login"');
header('HTTP/1.0 401 Unauthorized');
$showall = false;
}
else
{
error_reporting (E_ALL ^ E_NOTICE);
$showall = true;
}

if (!showall) {
echo "access denied";
} else {
?>

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

</head>
<body>

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

<? } ?>

</body>
</html>

Incrementing On Page Load
I have one form that I want to send email. Instead of using multiple pages, I have condensed it to one. However, I don't know how to increment a value, say "display", each time the submit button is clicked.

For instance - I have $display = "1". I want 1 to increment to 2, 3, and so on once the user clicks submit once, twice, etc. But I only want the "validation fields" to show after the user has clicked submit.

Set Time To Load A Page
I want to make a page which take time almost 60 seconds to load the contents....means a script in php which sleep for a 60 seconds and then execute the next part....

Page Load Frequency
I need a function to prevent a page from being loaded too often too
fast.
So say, one is only allowed to refresh a single page 5 times in 10
seconds, or 10 times in 5 seconds (or whatever ... ).
If the load frequency exceeds that, the site calls exit(); And a
message is displayed. Just like Expression Engine does ...

This way i want to protect the DB from being queried rediculously
often, and maybe even protect it from DDOS attacks.

I hope it's clear. I don't know where to start ..

Redirect If Page Does Not Load
I have a form that will not submit if certain data cannot be found in Mysql or it will take very long to submit. Is there a way i can have the form go to an error page if it does not submit or load results in 5 seconds.

If it does take long i need the following:
$msg[] = $error10;
header("Location: quote_error.php?");

Never Ending Page Load
When I run this script, it tries to load but after aout 10 minutes the whole browser locks up because it can't do it. I have a hunch it is because the while loop doesn't ever stop, but I don't know how to prevent it. Code:

Page Load Time
I have a php/html page that is taking longer to load then i think it should is there a way to see what part of the page is hanging it up?

Avoid Buton Back And Page Refresh Double Insertation ??
I have a big problem with an page, every time a make refresh the data are inserting one more time the same happens with back button, does any one knows how to avoid this big problem,

Submit Vs. A Fresh Page Load
I'm developing a page - mostly for the learning experience - that
includes a form with several text fields and a submit button. When
it's submitted, there is some server-side processing and the output is
displayed as part of the same page. (the form's action attribute is
set to: "<?php $PHP_SELF ?>").

One of the steps in the PHP script is to check for the existance of a
hidden element in the form so that I know whether the page is being
sent out as a result of a new request or from the form having been
submitted.

This all works as expected. When the page is sent out as a result of
having been requested from its "home" page, the results are not shown;
when the submit button is clicked, the page is sent out with the
results shown.

Finally my question: when viewing the page with the results shown, if
I press <F5> or click on "Refresh", it behaves as if I had clicked the
Submit button (that is, it shows the results). I would expect it to
return the page as if it was a new request (and NOT show the results).

How To Submit A Form Without New Page Load
I know that using a frame it can be done for AJAX. But
without frame is it possible to submit a form without
new page load?

Page Load Time + Iframe
There is any way to get the total load time of a page when you get an
"IFRAME" on it?
In all the tests, I got only the base page time without the "IFRAME"
time....

<?php
$bench = new phpCounter();
$bench->StartCouter();

$page = "<iframe class=......";
echo $page;

$bench->EndCounter();

echo $bench->GetCounter();
?>

Where:
// StartCounter() & EndCounter() call this function
function SetCounter ( ) // {{{
{

list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);

} // }}}

// Function to return the counter
function GetCounter ( ) // {{{
{

$output = ($this->end - $this->start);
return substr($output, 0, 5);

} // }}}

Set_error_handler: Page Does'nt Load
I've written a custom error handler and it works as it should on my development server(mac OS), but when I try to use it on the live server(freeBSD: PHP Version 4.0.1pl2) the pages that use set_error_handler("my_error_handler"); won't load. Is there some configuration setting that would prevent me from using a custom error handler?

Load Page In Middle Without Anchors
i am using php and have an "update.php" page that is a long list of input forms for an admin user to update database entries. each entry has its own "update" button.

so when the user edits an entry and clicks "update" s/he is directed to a processing script which updates the database and returns the user to "update.php".

heres my problem: the user is returned to the top of page (which is fairly long) so they have to scroll back down every time if they want to edit a number of subsequent entries. i would like the "update" submission to somehow save the current page view so that the user is returned to precisely the same scrolled down view as before.

can this be done without anchors?

i know i could use anchors but am i right that this would cause some scrolling up or down to the nearest anchor in general? i would prefer some way of doing it by percentage, pixels, etc so as to cause a sort of transparent departure and return to the page.

$_SERVER['argv'] Doesn't Have A Value On First Page Load.
when i first load index.php with arguments ie: "index.php?page=x", the
$_SERVER['argv']value is null. I then get the session id appended to
each link. If i refresh the page, I get the $_SERVER['argv'] I want,
but if i click a link $_SERVER['argv'] returns the value I want and
the session id.
Any ideas as to how I can get the $_SERVER['argv'] to return the
arguments on first page load?

INSERT Data On Page Load?
I have an avatar system where certain avatars are locked until the user unlocks them by going to certain pages of the site.

So far ( being the newb I am ) I only know how to INSERT data from a form. Is there a way to do it on page load or similar?

I also need it to first check if the data already exists and if not it inserts the data and then displays a message to the user that they have unlocked the avatar. Code:


Copyright Đ 2005-08 www.BigResource.com, All rights reserved