Jump to content

Archived

This topic is now archived and is closed to further replies.

Madatan

Help with page refresh and a second question

Recommended Posts

Okey, since i'm a noob when it comes to PHP I wonder if there is any function that will refresh the current page every time you run it.

I want something like this:
[code]
<?
if($gnarf == '1' && $yoda == true) {
refresh the page code here
}
?>
[/code]

Okey, so to my next question.

If I got a form with a button, let's call this button Hello. What I want to do with this button is make it impossible to click for, let's say 2,4seconds. Is this possible?

Share this post


Link to post
Share on other sites
#1
[code]
<?
if($gnarf == '1' && $yoda == true) {
  header("Location : ".$_SERVER['PHP_SELF']);
}
?>
[/code]
#2 Is a javascript question.

Share this post


Link to post
Share on other sites
[!--quoteo(post=380076:date=Jun 4 2006, 07:08 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 4 2006, 07:08 PM) [snapback]380076[/snapback][/div][div class=\'quotemain\'][!--quotec--]
#1
[code]
<?
if($gnarf == '1' && $yoda == true) {
  header("Location : ".$_SERVER['PHP_SELF']);
}
?>
[/code]
#2 Is a javascript question.
[/quote]

Okey, good to know it's a javascript then.

But I can't get it to refresh the page anyway, nothing happens when using that header code... any clue?

Share this post


Link to post
Share on other sites
you can do this in several ways. Mainly by using header function.

check out the link below. It shows different ways you can do it. you can specify the second that you want to refersh the page.

[a href=\"http://www.desilva.biz/php/phprefresh.html\" target=\"_blank\"]http://www.desilva.biz/php/phprefresh.html[/a]

Regards,
FiReDrOp

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.