473,499 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with header("refresh: 5; $url"); command

1 New Member
Hello everybody
can anyone tell me whats the correct syntax to add a variable previously declared to the url in the command header("refresh: 5, url:)
for example i want my URL to be
http://www.mibax.com/services/service1.php(more than one variables attached here)
can anyone tell me how to do so?
Apr 15 '08 #1
5 7787
Markus
6,050 Recognized Expert Expert
Hello everybody
can anyone tell me whats the correct syntax to add a variable previously declared to the url in the command header("refresh: 5, url:)
for example i want my URL to be
http://www.mibax.com/services/service1.php(more than one variables attached here)
can anyone tell me how to do so?
Hey tab, welcome to bytes!

You would just append the variables to the url in the header() function.

Although, im not clear on your qeustion, to be honest.
Can you explain a little more?
Apr 15 '08 #2
mmffrooq
2 New Member
@tabariz

replace ur header command with this 1 header("refresh:5;url=$url");
May 25 '09 #3
unauthorized
81 New Member
Do you mean http://url?var1=val1&var2=val2 by variables?
You can access these with the $_GET supperglobal variable. Look it up on php.net.

Expand|Select|Wrap|Line Numbers
  1. // replace var1 with the name of your variable
  2. if(isset($_GET['var1']))
  3.      header("refresh: 5; {$_GET['var1']}");
May 25 '09 #4
mmffrooq
2 New Member
@unauthorized
bro {$_GET['var1'] means that u r getting some value from the page u r directed from n tabraiz assigned $url variable already wid sum value like as u sayng maybe he assigned $url=$_GET['var1']; thats what i was wantd to say sowi for ma weak english :P
May 26 '09 #5
hi to all you can do that like this three examples below two of them with php and one with html :
1. header('Location: url') Example : header('Location: example.php'); or header('Location: http://www.example.com'); (Redirect URL Or Page)
2. header( 'refresh: 5; url=example.php'); or header('refresh: 5; url=http://www.example.com'); (Redirect URL OR PAGE in 5 Seconds)
3. echo '<meta name http-equiv=Refresh Content="5;url=example.php'; or echo '<meta name http-equiv="refresh" Content="5;url=http://www.example.com" '; (Redirect URL OR PAGE in 5 Seconds)
Oct 6 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
9518
by: George Copeland | last post by:
This is a request for help fixing a SQL Server 2000/ADO problem on Windows XP. I would appreciate any useful assistance. PROBLEM: SQL Server access on my machine fails as follows: 1. All of...
10
7816
by: Udi Zisser | last post by:
Hello, any idea why this does not work? or how do i get this thing to work? <BASE HREF="http://localhost/thedude/"> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html"> I'm adding...
1
1887
by: Chumley Walrus | last post by:
I'm trying to use : <META HTTP-EQUIV="Refresh" CONTENT="180; URL=main.aspx"> to refresh a mobile page (made in vs.net with the MMIT) for a page that I need to refresh every 3 minutes, but I...
2
3785
by: ujjc001 | last post by:
For some reason I can't Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 60) & "; URL=default.aspx") to add the tag into the header. In the source the refresh header is...
16
2892
by: a | last post by:
Hi everybody, My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2. I have been trying to handle the case of a lenghty opearation on the server while providing the user with feedback and...
10
2432
by: universalbitmapper | last post by:
Hi, I'm trying a simple form.html that call a .html script that begins with: <?php header("This is a test"); ?> When I click on the link, I get blank page.
0
3510
by: sagarp86 | last post by:
How to lock / deactivate "Refresh" and "Back" button on browser. Problem is in voting application. Once we click for a vote application goes to next page and increament one vote in the database....
4
9130
by: andre rodier | last post by:
Hello, I need to display or propose a jpeg image on a web page. When I need to display the image, I use this code : header("Content-Length: $fileSize") ; header("Content-Type: $type") ;...
3
2386
by: K Viltersten | last post by:
I've been informed that a webserver sending a XML file is supposed to add "Content-Type: text/xml header". I'm not questioning that infromation but i'm unsure what was ment by it. The XML i get...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.