Solved

meta http-equiv="refresh" DOESN'T WORK AT GOOGLE CHROME BROWSER

Posted on 2009-04-10
6
2,335 Views
Last Modified: 2013-12-12
Hi!
Can you help me with this ?  I have a page with a meta tag for refresh into another page regarding the url ID I have.  It works fine at IE, firefox, Safari but not in Google Chrome.
If your type in all other browsers :  www.justclick4.info/home.php?RecordID=1   goes to a page I have specify and if I type www.justclick4.info/home.php?RecordID=2 goes to an other page.
But in Google Chrome it doesn't.
<html><head><meta http-equiv="refresh" content="0;url=http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"></head>

Open in new window

0
Comment
Question by:SOUANI
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24114759
Seeing as you're using php and immediately redirecting the page, why don't you just do a 301 redirect.
This article explains about writing the Location header to redirect
http://www.phpf1.com/tutorial/php-redirect.html

Have a look at this w3c article explaining why you should use server side redirects.
http://www.w3.org/QA/Tips/reback
0
 

Author Comment

by:SOUANI
ID: 24114812
Thanks for the answer I know this redirect with Location Header but I how I will put t :  http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"> in the place of the url of the redirect ?   YOu cant write it like this. This works only inside html tags.

I dont know the right syntax.  I can do it with plain url ig. www.justclick4.info/index.php but I want to retrieve the url for my database

thank you
Penelope
0
 

Author Comment

by:SOUANI
ID: 24114851
to help you figure out what I am trying to do please see this:

How to write correct this code ?
<?php
    header('Location:http://$row_levels['statol_level']?RecordID=$row_owners['site_id']');
    die();
   
?>

like this I am getting an error
thank you ..

0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 15

Expert Comment

by:oobayly
ID: 24115111
Just concatenate the variables:
<?php
  header('Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);
  die();
?>

Open in new window

0
 

Author Comment

by:SOUANI
ID: 24121049
Hi!

I have put the suggested code but as you can see yourself it doesn't work.  url:  www.justclick4.info/home.php?RecordID=1

The url in my db are like this :  www.justclick4.info/index5.php (this is the field statol_level in table levers in mysql.
I assume I have them correct as the code you send me is like this Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);

thank you
0
 
LVL 15

Accepted Solution

by:
oobayly earned 500 total points
ID: 24121582
Can you give a few examples of what the statol_level & site_id are, and what url you want them to redirect to?
I can't quite follow how you expect "www.justclick4.info/index5.php" to change to " www.justclick4.info/home.php" without any string manipulation.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question