Solved

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

Posted on 2009-04-10
6
2,311 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 15

Expert Comment

by:oobayly
Comment Utility
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
Comment Utility
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
Comment Utility
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now