Jump to content


Photo

Help with page refresh and a second question


  • Please log in to reply
3 replies to this topic

#1 Madatan

Madatan
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 04 June 2006 - 11:53 PM

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:
<?
if($gnarf == '1' && $yoda == true) {
refresh the page code here
}
?>

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?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 05 June 2006 - 12:08 AM

#1
<?
if($gnarf == '1' && $yoda == true) {
  header("Location : ".$_SERVER['PHP_SELF']);
}
?>
#2 Is a javascript question.

#3 Madatan

Madatan
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 05 June 2006 - 12:44 PM

[!--quoteo(post=380076:date=Jun 4 2006, 07:08 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 4 2006, 07:08 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
#1
<?
if($gnarf == '1' && $yoda == true) {
  header("Location : ".$_SERVER['PHP_SELF']);
}
?>
#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?

#4 firedrop84

firedrop84
  • Members
  • PipPipPip
  • Advanced Member
  • 49 posts

Posted 05 June 2006 - 01:47 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users