John Ayers
John Ayers

Reputation: 519

Refreshing page with Query String

How can I refresh a page automatically after a given time period with a variable attached to it?

This is what I have tried but no luck.

<meta http-equiv="refresh" content="3" <?php echo 'url="game.php?id=' .  $id . '"'?>>

At the moment it ignores the the php code completely.

Upvotes: 0

Views: 803

Answers (3)

sakhunzai
sakhunzai

Reputation: 14470

Try:

<meta http-equiv="refresh" content="2;url=<?php..?>"> 

content attribute have both time in sec and url separated by semi-colon

Upvotes: 0

0x46616c6b
0x46616c6b

Reputation: 1465

Try this:

<meta http-equiv="refresh" content="3; <?php echo 'URL=game.php?id=' .  $id ?>">

Upvotes: 0

hjpotter92
hjpotter92

Reputation: 80639

just a little problem

<meta http-equiv="refresh" content="3;<?php echo 'url=game.php?id=' .  $id; ?>" />

Upvotes: 3

Related Questions